Madhan
Madhan

Reputation: 2639

internal implementation details of XML parsing using java xml parser

can anyone tell how an XML (Java) parser will parse the XML document( i mean to say the internal implementation details of XML parsing)?

Upvotes: 0

Views: 312

Answers (1)

Matt Ryall
Matt Ryall

Reputation: 10555

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.

Upvotes: 1

Related Questions