Java XML

Working with XML (eXtensible Markup Language) in Java typically involves parsing XML documents to extract information or creating XML documents from Java objects.

Java provides several libraries and APIs for handling XML data.

Related Tags

Tutorials

Java XPath – Find XML Nodes by Attribute Value

This Java tutorial demonstrates how to get matching nodes for an attribute value in an XML document using XPath. 1. XPath Expressions 1.1. Input XML File First look at the XML file which we will read and then fetch information from it, using xpath queries. 1.2. XPath Expressions Now see …

Java Convert Properties File to XML File

Java example to create XML file from Properties object or any existing .properties file. To convert an XML file to .properties file, follow the steps given in linked tutorial. 1. Create XML File from Properties File To convert the properties file into an XML file, the best way is to …

Read XML with JDOM2 Parser in Java

JDOM parser can be used to read XML, parse xml and write XML file after updating content of it. It stores JDOM2 document in memory to read xml values.

Difference between DOM and SAX Parser

Both DOM and SAX parsers are extensively used to read and parse XML files in java applications and both of them have their own set of advantages and disadvantages.

Java Read XML using SAX Parser

In this tutorial, learn to read or parse XML document using Java SAX parser API for XML example. Learn to parse XML elements to java objects.

Java XPath – How to Get Attribute Value

Learn to parse an XML document and read the value of an attribute using XPath in Java. We can read the attribute value for all its occurrences in the document, or only for selected nodes in the XML. 1. XPath Expression for Attributes In XPath, the ‘@’ is used to …

Java XPath Tutorial (with Examples)

Java XPath Example. XPath is a syntax used to describe parts of an XML document. In this tutorial, we will see some useful ways to apply xpath to extract information from an XML file.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.