parser (UPnP AV)
A version of this page is also available for
4/8/2010
This class provides an object-oriented representation of a DIDL-Lite XML fragment. Given DIDL-Lite XML data, this class returns a succession of object instances. The DIDL-Lite schema is defined in the ContentDirectory documentation in UPnP AV DCP Documentation.
Syntax
class parser
Methods
The following table shows the methods for this class.
Method | Description |
---|---|
Accepts DIDL-Lite XML data and returns a pointer to the first object. |
|
Returns the next object represented by the DIDL-Lite XML data passed to GetFirstObject. |
|
Makes the specified XML namespace and corresponding prefix available to use with object properties and methods. |
Remarks
To use this class:
- Retrieve DIDL-Lite XML from a method such as IContentDirectory::Search, IContentDirectory::BrowseChildren, or IContentDirectory::BrowseMetadata.
- To retrieve an object instance that contains properties for the first object in the DIDL-Lite XML, call parser::GetFirstObject. The object class is defined in the av_upnp::DIDL_Lite C++ namespace; therefore, it is usually referred to by using the code av_upnp::DIDL_Lite::object or by using the av alias, as av::DIDL_Lite::object.
- To retrieve the remainder of the objects contained in the XML data, call parser::GetNextObject multiple times.
The parser is responsible for allocating the memory for the pProperty field of av::DIDL_lite::object. Therefore, even if the av:DIDL::lite::objects are created on the heap, but the parser is not, the memory in pProperty field of the av::DIDL_lite::object will be freed, which will make the object unusable for future operations. Therefore, the application writer must keep both the parser and object in memory scope in order to reuse the object.
Requirements
Header | av_upnp.h |
Library | Av_upnp.lib |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
UPnP AV Control Point Utility Classes
IContentDirectory::BrowseChildren
IContentDirectory::BrowseMetadata
IContentDirectory::Search
object (UPnP AV)