In Tutorials we are going to see brief introduction about XML and its usage in Java.Java comes with set of API to process XML, we will see all the XML processing API available in JAVA in upcoming chapters.
XML OverviewXML – Extensible Markup Language
XML was introduced by World Wide Web Consortium (W3C) in 1998.The XML document is group of elements, each element has a start tag, content node and end tag.Element also contains another element.The XML document must have only one root element, which is enclose the all other tags.
The XML file must satisfy the following conditions.
- XML document must start with prolog (Example <?xml version="1.0"?>);
- Every opening tag must be closed properly.
- All tags are completely nested.
<?xml version="1.0" encoding="UTF-8"?>
<name>Java Tutorials Corner</name>
<java id="1">Core Java, JDBC, XML Parsing, etc</java>
<j2ee>Servlet, JSP, Web Service, SOAP Web Service, RESTful Web Service, etc </j2ee>
JAVA XML OverviewJava comes with set of API to process the XML documents.
- DOM Parser
- SAX Parser
- StAX Parser
- XSL Processor