DOM XML Parser in Java
DOM Stands for Document Object Model and it represent an XML Document into tree format which each element representing tree branches. DOM Parser creates an In Memory tree representation of XML file and then parses it, so it requires more memory and its advisable to have increased heap size for DOM parser in order to avoid Java.lang.OutOfMemoryError:java heap space . Parsing XML file using DOM parser is quite fast if XML file is small but if you try to read a large XML file
using DOM parser there is more chances that it will take a long time or
even may not be able to load it completely simply because it requires
lot of memory to create XML Dom Tree. Java provides support DOM Parsing
and you can parse XML files in Java using DOM parser. DOM classes are in
w3c.dom package while DOM Parser for Java is in JAXP (Java API for XML Parsing) package.
No comments:
Post a Comment