XML-12 J. Teuhola 2013 209
- 12. Application program interfaces (APIs)
- XML documents are text files – in principle no special
APIs are required.
- However, for example parsing and validation are
tasks needed in almost any application.
- Predefined class libraries and standardized interfaces
reduce programmer’s work & errors.
- Main alternatives:
– Document Object Model (DOM) – Simple API for XML (SAX) – Streaming API for XML (StAX)
- Example implementation by Sun: JAXP