javax.xml


1. XML Parsing with DOM

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse("file.xml");

2. XML Parsing with SAX

SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
MySAXHandler handler = new MySAXHandler();
parser.parse("file.xml", handler);

3. XML Parsing with StAX

XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader("file.xml");
while (reader.hasNext()) {
    int eventType = reader.next();
    // Process event types
}

4. XML Serialization with DOM

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.newDocument();
// Create XML structure
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult("file.xml"));

5. XML Serialization with StAX

6. XML Validation

7. XPath Evaluation

8. XSLT Transformation

9. XML Signature

10. XML Encryption

11. SOAP Message Processing

12. SOAP Web Service Client

13. SOAP Web Service Server

14. XML Schema Generation

15. XML Schema Validation

16. JAXB Binding

17. JAXB Marshalling

18. JAXP Transformer Factory

19. JAXP XPath Factory

20. JAXP Validator

21. JAXP Document Builder Factory

22. JAXP SAX Parser Factory

23. JAXP Document Object Model (DOM)

24. JAXP Simple API for XML (SAX)

25. JAXP Streaming API for XML (StAX)

26. XML Bridge API

27. DOM4J Library