22.8 LINQ to XML: Document Object Model (DOM)
Although an XML document is a text file, retrieving data from the document using traditional sequential file-processing techniques is not practical, especially for adding and removing elements dynamically.
On successfully parsing a document, some XML parsers store document data as trees in memory. Figure 22.19 illustrates the tree structure for the document article.xml
discussed in Fig. 22.2. This hierarchical tree structure is called a Document Object Model (DOM) tree, and an XML parser that creates such a tree is known as a DOM parser. DOM gets its name from the conversion of an XML document’s tree structure into a tree of objects that are then manipulated using an object-oriented programming ...
Get C# 6 for Programmers, Sixth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.