Hello and welcome to JAX-P article,
in this article,we will discuss details about JAX-P. JAX-P stands for XML processing.
As we disscussed in 'What is XML' article, XML is also a document which contains data.
earlier there were no options in JAVA to read XML files, users has to use java I/O to XML document.
later JAVA has provided to this API to process XML documents.
XML can be read either from starting or in random order ,JAVA provides two types of parsers to process XML files.
SAX-PARSER :
SAX parser reads the document in sequential order.
it is event based parser.
there are different types of events called document start,element start,element end..
it can read only one element at any time.
it uses less memory
it is fast compared with DOM parser.
SAXParserFactory saxparserFactory=
SAXParserFactory.newInstance();
SAXPARSER parser=saxparserFactory.newSAXParser();
using parser, we can parse the XML documents. it provides some set of methods to perform the read operations
SAX parser can only read the documents.
in this article,we will discuss details about JAX-P. JAX-P stands for XML processing.
As we disscussed in 'What is XML' article, XML is also a document which contains data.
earlier there were no options in JAVA to read XML files, users has to use java I/O to XML document.
later JAVA has provided to this API to process XML documents.
XML can be read either from starting or in random order ,JAVA provides two types of parsers to process XML files.
SAX-PARSER :
SAX parser reads the document in sequential order.
it is event based parser.
there are different types of events called document start,element start,element end..
it can read only one element at any time.
it uses less memory
it is fast compared with DOM parser.
SAXParserFactory saxparserFactory=
SAXParserFactory.newInstance();
SAXPARSER parser=saxparserFactory.newSAXParser();
using parser, we can parse the XML documents. it provides some set of methods to perform the read operations
SAX parser can only read the documents.