Tuesday 15, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Thursday, 5 March 2015

Java StAX API Overview

The 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 API

2. Iterator API

Cursor API 

As the name implies, the StAX cursor API represents a cursor with which you can parse an XML document from beginning to end. This cursor can point to one thing at a time, and always moves forward, never backward, usually one element at a time.

The two main interfaces in cursor are

1. XMLStreamReader

2.  XMLStreamWriter

Iterator API

The StAX iterator API represents an XML document stream as a set of discrete event objects. These events are pulled by the application and provided by the parser in the order in which they are read in the source XML document.The base iterator interface is called XMLEvent. The primary parser interface for reading iterator events is XMLEventReader, and the primary interface for writing iterator events is XMLEventWriter

Shop and help us

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

Related Posts:

  • Java Best Practice – Naming ConventionsNaming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier—for example, whether it’s a constant, package, or class—which can … Read More
  • How to convert JSON to Java Object using JacksonIn this Tutorials we are going to see how to convert JSON String to Java object using Jackson data binding. 1. Create project called JSONExample. 2. Create package called com.javatutorialscorner.jackson  3. Cr… Read More
  • How to convert String to Date Time format in JavaIn this tutorial we are going to see how to convert String to Date Time format using SimpleDateFormat. 1. 12-10-2013 12:02:35 PM format to Util Date Timepackage com.javatutorialscorner.util;import java.text.ParseException;i… Read More
  • Java Best Practice - StatementsSimple StatementsEach line should contains one statement.Examplearg1++; //CORRECTarg2++; //CORRECTarg1++;arg2- -; //AVOIDCompound StatementsCompound statemen… Read More
  • Read File using BufferedInputStream In this tutorials we are going to see how to read file using BufferedInputStream. Create project called JavaMisc. Create package called com.javatutorialscorner.io  Create java class called FileReaderExample… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Java StAX API Overview Rating: 5 Reviewed By: eHowToNow