XML DOM Application Development (Windows CE 5.0)
With DOM, applications can work with XML document structures and information as program structures rather than as text streams. By using the built-in facilities of the DOM API in this implementation, applications and scripts can read and manipulate the program structures without understanding the details of XML syntax.
The following list shows the functionality provided by DOM:
- Loads or creates a document
- Performs Document Type Definition (DTD) validation or schema validation
- Gathers errors
- Accesses and manipulates the information and structures contained within the document
- Caches the schema in memory
- Saves the document back out to an XML file
The DOM uses a tree-like hierarchy of nodes in an XML document. These nodes represent document content and structures and may contain, or are contained by, other nodes. Much of your work with XML processing requires navigating this tree structure to find or modify the information it contains. When you work with XML, you need to think of information in terms of nested containers and be sure that information is put into or retrieved from the right container.
The DOM treats nodes as generic objects. This makes it possible for you to create a script that loads a document and traverses all of the nodes. The script then reports what it finds in the tree.
The DOM APIs enable applications to traverse the tree and manipulate its nodes. Each node is defined as a specific node type, according to the XML DOM Enumerated Constants, which also define valid parent and child nodes for each node type. For the majority of XML documents, the most common node types are element, attribute, and text. Attributes occupy a special place in the model because they are not considered child nodes of a parent and are treated more like properties of elements. An additional API, the IXMLDOMNamedNodeMap, is provided for attributes. For information about XML DOM Enumerated Constants, see XML DOM Enumerated Constants. For information about the API IXMLDOMNamedNodeMap, see IXMLDOMNamedNodeMap.
- You access IXMLDOMNodeList
- IXMLDOMNamedNodeMap
- IXMLDOMParseError
The XML parser on Windows CE is componentized into various XML technologies, which may or may not be included in your Windows CE-based device, depending on the Catalog items included in the OS design by the hardware manufacturer. For a more information about the technologies making up the XML parser, see XML Parser Architecture for Windows CE. For a more information about the APIs and XML functionality not supported by XML on Windows CE, see XML for Windows CE. For more information about XML, see this Microsoft Web site.
In This Section
- XML for Windows CE
Provides a high level overview of the XML objects and interfaces that are not supported in Windows CE-based devices. - Using Threads with XML for Windows CE
Provides information about the level of support that is available in Windows CE-based devices for the XML threading options.
Related Sections
- XML Minimal Parser
Provides information about the Windows CE XML Minimal Parser which is a limited version of the XML parser on the desktop.
Send Feedback on this topic to the authors