can anyone tell how an XML (Java) parser will parse the XML document( i mean to say the internal implementation details of XML parsing)?
+1
A:
The exact algorithm probably varies quite a bit between different implementations.
Xerces is a widely used XML parser for Java. It is open source so you can download the Java source code to see how it is implemented.
Antlr is a parser generator for Java that makes writing a parser for languages like XML somewhat easier than doing it by hand. The Antlr documentation has some information about how you would write an XML parser using Antlr: Parsing XML. This covers most of the concepts of how such parsers work if you're more interested in a high level view.
Matt Ryall
2009-11-18 12:09:23