次の方法で共有


XML DOM Application Development (Windows Embedded CE 6.0)

1/6/2010

With Document Object Model (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.

DOM provides the following functionality:

  • 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 live under 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, IXMLDOMNamedNodeMap, is provided for attributes. For information about XML DOM Enumerated Constants, see XML DOM Enumerated Constants.

The XML parser on Windows Embedded CE is componentized into various XML technologies, which may or may not be included in your Windows Embedded CE-based device, depending on the OS design created by the hardware manufacturer. For a more information about the technologies making up the XML parser, see XML Parser Architecture for Windows Embedded CE. For a more information about the APIs and XML functionality not supported by XML on Windows Embedded CE, see XML for Windows Embedded CE. For more information about XML, see XML in the Data Platform Developer Center.

In This Section

  • XML for Windows Embedded CE
    Provides a high level overview of the XML objects and interfaces that are not supported in Windows Embedded CE-based devices.
  • XML Minimal Parser
    Provides information about the Windows Embedded CE XML Minimal Parser which is a limited version of the XML parser on the desktop.

See Also

Other Resources

XML Core Services and Document Object Model