Tree manipulation
Most XML processors support the tree-walking approach to provide access to the document in a 'random-access' method (by 'tree-walking' the document structure). The XML processor first reads the entire document into memory, before allowing the application instant access to any part of it. There is no need for multi-pass parsing. The processor therefore organizes the content so that it can be easily found and manipulated. Applications that benefit from this approach include XML-sensitive document editors and transformation tools (including XSLT engines).
But, as this is a more sophisticated technique than the event-driven approach described above, there are some concepts and associated terminology that need to be understood.
Get XML Companion, The, Third 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.