Saturday 12, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Friday, 8 November 2013

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 Overview

XML – 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.
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 Overview

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.

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • Java StAX Parser – StAX Iterator API Write ExampleIn this tutorial we are going to see about how to write XML document using Java StAX parser Iterator API.Player.java package com.javatutorialcorner.stax;public class Player { private int rank; private String name; private Str… Read More
  • Java StAX Parser – Cursor API Read ExampleIn this tutorial we are going to see about StAX cursor API to read an XML document. In the Cursor example, the application instructs the parser to read the next event in the XML input stream by calling next(). Note that next(… Read More
  • Java StAX API OverviewThe StAX API exposes methods for iterative, event-based processing of XML documents. The StAX API is bidirectional, enabling both reading and writing of XML documents.The StAX API is really two distinct API sets 1. Cursor AP… Read More
  • Java StAX Parser – Cursor API Write ExampleIn this tutorial we are going to see about how to write XML document using Java StAX parser Cursor API.Player.java package com.javatutorialcorner.stax;public class Player { private int rank; private String name; private Strin… Read More
  • Java StAX Parser – Read XML using StAX Iterator API In this tutorial we are going to see how to read XML file using StAX Iterator API.For this tutorial we have following XML file that contains list of Cricket teams. crcicket.xml India MS Dhoni South Afric… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Java XML Introduction Rating: 5 Reviewed By: eHowToNow