This is the Java example section of the XML Tutorial site. The examples are organized as follows:
- XML & Java
- XPATH & Java
- XSLT & Java
This is an ongoing project - Be sure to follow our site as we are constantly adding new content just for you! If you have a special request, contact us and let us know!
XML
XPATH
All Java Examples
Java References
- Java API for XML Processing (JAXP) The Java API for XML Processing (JAXP) is for processing XML data using applications written in the Java programming language.
- Java Architecture for XML Binding (JAXB) XML and Java technology are recognized as ideal building blocks for developing Web services and applications that access Web services. A new Java API called Java Architecture for XML Binding (JAXB) can make it easier to access XML documents from applications written in the Java programming language.
Latest Additions
- How to create a XML document - A newly created, in-memory, XML document is sometimes necessary for ad-hoc data manipulation and / or document generation.
- How to read an XML attribute value - There are a number of methods to read an XML attribute value. We present two common methods here: Locate and read an element value using the XML DOM; or Locate and read an element using XPATH expressions.
- Marshal / Un-marshal POJO’s as XML - Integration between disparate systems sometimes require a mapping exercise between the protocol XML and the POJO you are using for data storage processing. Java defines a comprehensive binding framework – JAXB – which can be used for this task.
