What is termed as a Valid Document in XML
Hi,
How does a XML document is validated. That means the validation of the document is authenticated by whom. What does a parser and sax means. Are this too terms responsible for XML validation. I need some information on how to validate a XML documents. Also post the way of doing so. I have some XML documentation which are fetching errors under this circumstances. Thanks in advance.
Re: What is termed as a Valid Document in XML
An XML document must be well made but this does not guarantee that its structure is consistent with what is expected, which is critical in the context of XML data exchange international applications. To enable this control, the grammar of the XML vocabulary used, the ordering of its elements and attributes must be known and formalized.
Re: What is termed as a Valid Document in XML
Different languages, the most popular being DTDs and W3C XML Schemas allow to formalize this grammar, and are implemented by most parsers, which are defined accordingly as validating parsers. The validation operation is therefore the comparison, when reading an XML document by validating parser, the XML file structure with the grammar expressed in one of these languages. The XML document will be considered valid if both agree.
Re: What is termed as a Valid Document in XML
A parser is a software tool, a parser, which allows a client application to validate (if it is a validating parser) an XML document and read it, see change. A parser makes available to the application client read the XML data through APIs, the most common being SAX and DOM. Another class of parsers, more recently, includes a pull technology, combining the advantages of SAX - defined as a PUSH technology - and without their drawbacks DOM . StAX (Streaming API for XML) is an example of Java API Pull parsers implemented by BEA and Sun.
Re: What is termed as a Valid Document in XML
The validation of XML is an matching problem caused due to the usage of regular expressions. Like if it is given in the regular one that is e for expression and s for string then s in L(e) gives the acceptance of the language. Finite Automat is the common technique that is widely used to solve this problem. This is known to all and if you are too familiar with this then the issue will no arise.
Re: What is termed as a Valid Document in XML
SAX has the advantage, through its operation, not read the code in small portions, which avoids to load into memory completely, unlike DOM. It is very helpful for reading large documents. It will not cons not suitable for cases where the client application can not be satisfied with a linear path and "snippets" of the XML document.