Use of Parser in XML
In this article I have described an XML parser used in parsing an XML document into an XML DOM object with the help of an example.
An XML parser is a parser that is designed to read XML and create a way for programs to use XML.
The main function of XML parser is to convert converts an XML document into an XML DOM object.
There is nothing there to write XML but every program must implement or call on an XML parser.
Type of XML Parser
XML parsers are available into two form
Parse an XML Document
Lets take an xml document and save it as "school.xml"
<?xml version="1.0" encoding="utf-8" ?>
<School>parsering of XML document</School>
<Department>Department of XML parsing</Department>
The following code parses above XML document into an XML DOM object
Difference between TXmlParser and TXmlScanner
TXmlParser is a Delphi CLASS for easy parsing of an XML file while TXmlScanner is a VCL wrapper for TXmlParser. That means we should use TXmlParser for serious work and TXmlScanner for "quick hacks".
You may also want to read these related articles
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here