only for RuBoard |
You have seen many of the various classes in the System.Xml and System.Xml.XPath namespaces. A number of different approaches of working with XML were provided, each with its own unique benefits.
The XmlDocument class loads all its data into memory. This makes updating the XML contained in it easy, and enables random access to any of its nodes. This flexibility comes at a price: Loading a large XML document can consume plenty of memory, causing a server-side application to be less scalable. Using this class is best suited for making many updates to an existing XML document.
When using the XmlDocument class' SelectSingleNode or SelectNodes methods , remember that you need to use an XmlNamespaceManager class to create namespace prefixes associated with the URIs in the document, or the results won't be the same as what you expect.
The XmlReader class performs fast forward-only, non-cached reading of XML data. The tradeoff for its speed capabilities is that you cannot navigate through the ancestor axis (parents, parents' parents, and so on). This class is best suited for reading an entire existing XML document.
The XPathDocument class is an extremely performant class that provides random, read-only access to XML documents. This class can be used over any data store (such as a file, stream, or DOM document), and can be customized to navigate over custom stores.
Finally, you learned that you can use the XsltArgument class to pass parameters to an XsltTransform class.
only for RuBoard |