Java XML Introduction

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 – Extensible Markup Language Overview

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 );
  • Every opening tag must be closed properly.
  • All tags are completely nested.

Sample XML Document

<?xml version="1.0" encoding="UTF-8"?>
<website>
<name>Java Tutorials Corner</name>
<tutorials>
<java id="1">Core Java, JDBC, XML Parsing, etc</java>
<j2ee>Servlet, JSP, Web Service, SOAP Web Service, RESTful Web Service, etc </j2ee>
</tutorials>
</website>

JAVA XML APIs

Java comes with set of API to process the XML documents.

  1. DOM Parser
  2. SAX Parser
  3. StAX Parser
  4. JAXB
  5. XPath
  6. XSL Processor
  7. JDOM

We will see the details of each XML processing API in upcoming chapter.


Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. How to Count number of Element in XML
  2. How to read XML file using SAX Parser
  3. How Read UTF-8 character XML file using SAX Parser
  4. Java XML Introduction
  5. XML SAX Parser Introduction
  6. How to create XML file using DOM Parser
  7. Java DOM XML Parser
  8. How to Modify XML file using DOM Parser
  9. How to read simple XML file using DOM Parser
  10. How to Read XML File using DOM parser
  11. Read XML File as List of Object using SAX Parser

Be the first to comment

Leave a Reply