Friday, 22 October 2010

AWT- Validity of XML

How to test the validity of XML Document?

#  XML document must be well-formed, and also valid in most cases. There are many online tool provided to facilitate developers to verify and validate candidate documents. Such as XML Blueprint can validate any XML Document against a DTD, Relax NG Schema, Schematron Schema or XML Schema:
Open your XML Document in the XML Editor.
Click XML > Validate.
When we click the Validate button in the output, validation is successfully carried out for the input file against the .dtd and the text “Document is Valid!” is displayed as shown in the Figure 


Validation is the process of enforcing rules on the XML content either by means of a Document Type Definition (DTD) or a schema. The ValidationType property indicates the type of validation to be performed on the XML document. If you set the property to ValidationType.None, then it is equivalent to a non-validating reader.  
Values
Description
Auto
XmlValidatingReader validates if DTD or schema information is found. No validation if non-DTD or schema declared. (Default)
DTD
DTD validation.
None
Creates an XML 1.0 compliant non-validating parser. No validation errors are thrown.
Schema
Validate according to XSD schemas.
XDR
Validate according to XDR schemas.
                                                                                                                                         
Validation of XML documents help to ensure the information is structured in a way that is sensible for applications which use it.

No comments:

Post a Comment