Which Java API is commonly used for processing XML documents?

Which Java API is commonly used for processing XML documents?

A) SAX
B) DOM
C) JAXB
D) All of the above

Answer:

D) All of the above

Explanation:

Java provides several APIs for processing XML documents:

  • SAX (Simple API for XML): An event-driven, streaming API for processing XML documents.
  • DOM (Document Object Model): A tree-based API that loads the entire XML document into memory as a tree structure.
  • JAXB (Java Architecture for XML Binding): An API for converting Java objects to XML and vice versa, using annotations.

Each of these APIs has its own use cases depending on the complexity and requirements of the XML processing task.

Reference links:

https://www.javaguides.net/p/java-xml-tutorial.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top