112 Chapter 4 " Using XML in the .NET Framework Introduction As you turn to the .NET Framework to start working with XML, you find a number of namespaces that have Xml in their names.They deliver a broad set of classes, supporting you in the use of XML.We will discuss all XML-related namespaces in the coming chapters, which will make it clear that they support in most cases all of your XML needs. However, the .NET Framework does not sup- port all standards available. Luckily, it will let you built your own XML name- spaces, using the existing ones. XML and its related standards will keep on evolving, making it not always easy for Microsoft to keep the namespaces up with these developments. Lets hope that Microsoft makes use of the features they built into the .NET Framework by updating and releasing individual assemblies; in our case, the namespaces with improved XML support. This chapter discusses the System.Xml namespace that contains the classes that implement the XML Core. For this reason, we will also take a closer look at the XML Document Object Model (DOM) that is at the heart of the XML definition. Explaining the XML Document Object Model The XML Recommendations from the W3C were not completed in one day. They were written very slowly, one at a time, allowing a good deal of time between each before the next was drafted.This allowed the W3C to iteratively create recommendations and determine features of the DOM levels. In doing so, each DOM level built upon the previous level, and it is possible to create an XML parser that implements some, but not all, of the levels (or even some fea- tures of each level, but not all features). The DOM is a recommendation made by the W3C to enable a standard way of providing access to the data contained in an XML document. It is essentially a list of interfaces and class recommendations to allow anyone to internally imple- ment an XML parser and expose a common interface to enable a developer access to his or her XML data.This interface is based on the idea that the XML is in a hierarchical or tree-like structure, where certain nodes might contain child nodes, which might also contain child nodes, and so on.The DOM provides the capabilities to navigate this tree of nodes in a relatively simple programmatic manner. Some of the DOM API capabilities include: www.syngress.com 155_xml_net_pd_C04.qk 3/6/02 1:57 PM Page 112