Skip to Content
Special Edition Using XML, Second Edition
book

Special Edition Using XML, Second Edition

by - et al. David Gulbransen
July 2002
Intermediate to advanced
864 pages
22h 32m
English
Que
Content preview from Special Edition Using XML, Second Edition

Document Based Parsing with DOM Under Java

Although event based parsing with the Simple API for XML is fast and memory efficient, it does not provide any context for where the current element is in the hierarchy of the document. This is due to the fact that parsing via SAX is effectively a one-shot operation: The parser only knows about the current element at the moment when it notifies the event handler and then promptly forgets about it.

For applications in which it is useful to have the parser remember more of this contextual information, using a parser that implements DOM is appropriate. DOM has the advantage of storing a complete copy of the XML document in memory at all times, allowing programmers to traverse through the hierarchy of elements ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
Essential XML: Beyond Markup

Essential XML: Beyond Markup

Don Box, Aaron Skonnard, John Lam

Publisher Resources

ISBN: 078972748XPurchase book