Apache Xerces Tutorial

Apache Xerces Tutorial

Apache Xerces Tutorial is a Java-based processor that provides standard interfaces and implementations for DOM, SAX and StAX XML parsing API standards. This tutorial will teach you the basic XML concepts and also explain how to use the various types of Apache Xerces XML parsers in a simple and intuitive way.

Audience

This tutorial has been designed for the beginners to help them understand the fundamentals related to XML parsing using Java Programming language. After completing this tutorial you will find yourself at a moderate level of expertise in knowledge of XML parsing using Java from where you can take yourself to the next levels.

Prerequisites

Knowledge of computers is not a prerequisite to follow the contents of this tutorial. This tutorial assumes no background in computers or computer programming, though basic knowledge of computer terminologies will help in understanding the given concepts very easily.

What is XML?

XML is a simple text-based language which was designed to store and transport data in plain text format. It stands for Extensible Markup Language. Following are some of the salient features of XML.

  • XML is a markup language.
  • XML is a tag based language like HTML.
  • XML tags are not predefined like HTML.
  • You can define your own tags which is why it is called extensible language.
  • XML tags are designed to be self-descriptive.
  • XML is a W3C Recommendation for data storage and transport.

Example

<?xml version = "1.0"?>
<Class>
   <Name>First</Name>
   <Sections>
      
      <Section>
         <Name>A</Name>
         <Students>
            <Student>Rohan</Student>
            <Student>Mohan</Student>
            <Student>Sohan</Student>
            <Student>Lalit</Student>
            <Student>Vinay</Student>
         </Students>
      </Section>
      
      <Section>
         <Name>B</Name>
         <Students>
            <Student>Robert</Student>
            <Student>Julie</Student>
            <Student>Kalie</Student>
            <Student>Michael</Student>				
         </Students>
      </Section>
      
   </Sections>
</Class>

Advantages

Following are the advantages provided by XML −

  • Technology agnostic − Being plain text, XML is technology independent. It can be used by any technology for data storage and transmission purpose.
  • Human readable − XML uses simple text format. It is human readable and understandable.
  • Extensible − In XML, custom tags can be created and used very easily.
  • Allow Validation − Using XSD, DTD and XML structure can be validated easily.

Disadvantages

Following are the disadvantages of XML usage −

  • Redundant Syntax − Normally XML file contains numerous repetitive terms.
  • Verbose − Being a verbose language, XML file size increases the transmission and storage costs.

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply