XML Parser



XML Parser

  • The word parser comes from compilers.
  • In a compiler, a parser is the module that reads and interprets the programming language.
  • In XML, a parser is a software component that sits between the application and the XML files.
  • It reads a text-formatted XML file or stream and converts it to a document to be manipulated by the application.
  • By Definition, A parser is a piece of program that takes a physical representation of some data and converts it into an in-memory form for the program as a whole to use.
  • Parsers are used everywhere in software.
  • An XML Parser is a parser that is designed to read XML and create a way for programs to use XML
 How XML Parser Works

Learn XML - XML tutorial - How XML Parser Works - XML examples - XML programs

XML Documents

  • Document Type Definition (DTD)
    • A document type definition (DTD) provides applications with advance notice of what names and structures can be used in a particular document type (i.e., it is a formal description in XML declaration syntax of a particular type of document).
    • A DTD sets out what names are to be used for the different types of element, where they may occur, and how they all fit together.
  • XML Markup
    • The XML markup is composed to pairs of tags, elements and attributes.
    • XML documents must be well-formed.
    • Start and end tags must match.
    • Element tags must be properly nested.

How XML Parser Works

 How XML DOM Parser Works

Learn XML - XML tutorial - How XML DOM Parser Works - XML examples - XML programs

Writing and Running an XML Based Application

  • Three basic steps to use an XML parser
    • Create a parser object
    • Pass your XML document to the parser
    • Process the results
 Writing and running an xml-based application

Learn XML - XML tutorial - Writing and running an xml-based application - XML examples - XML programs

How Business flows in XML World

 Business flow in XML

Learn XML - XML tutorial - Business flow in XML - XML examples - XML programs

  • User ‘s services
    • Prepare data for human users.
  • Business services
    • Take user's request, decide the required information and how to get it.
    • After information is obtained, synthesize into a suitable format for user.
  • Data services
    • Host data, descriptions of data, and small programs for presenting and manipulating the data.
 Business flow in XML world

Learn XML - XML tutorial - Business flow in XML world - XML examples - XML programs

XML XSL - Parser

 XML XSL Parser

Learn XML - XML tutorial - XML XSL Parser - XML examples - XML programs

Read Also

XSL XML to HTML

Xml-based Standards and Markup Languages

The Customized Markup Languages include

  • MathML - Markup Language for Mathematical Expressions.
  • WML - The wireless markup language allows the text portions of web pages to be displayed in wireless devices.
  • XBRL. - The extensible business reporting language (XBRL) facilitates creation, exchange and validation of financial information (e.g., annual budgets, dividends).
  • PDML -The product data interchange language is for businesses and government agencies. See http://www.pdml.org .
  • aecXML - aecXML is a specific XML mark-up language which uses Industry Foundation Classes to create a vendor-neutral means to access data generated by Building Information Modeling. It is being developed for use in the architecture, engineering, construction and facility management industries, in conjunction with BIM software.
 Xml-based standards and markup languages

Learn XML - XML tutorial - Xml-based standards and markup languages - XML examples - XML programs

Advantages of XML

  • Client-side processing of web search results
    • Reduces the number of iterations needed for a precise search.
    • Reduces network traffic by moving some of the required processing from the server to client-side computers.
Xml Client Side Processing

Learn XML - XML tutorial - Xml Client Side Processing - XML examples - XML programs

API in XML Parsers

  • parser reads the XML document as plain text. The API offers programmers a set of functionality that they can call from a program to request information from the parser as it processes the document.
  • The two most common APIs are
    • Document object model (DOM) - Defines a logical tree representing the parsed XML.
    • Simple API for XML (SAX) - Define handlers containing methods as XML parsed.
  • Some parsers are able to check (or validate) that an instance of an XML document against the data type definition (DTD) that is used to describe the vocabulary, and to check whether the actual markup conforms to the rules of the markup language
 API in XML Parser

Learn XML - XML tutorial - API in XML Parser - XML examples - XML programs



Related Searches to XML Parsers