HOME
XML Basic
XML
Introduction XML
Basic Tags
XML Validation
XML with CSS
XML CDATA
|
XML validation
XML must be well formed
An xml that contains a DOCTYPE declaration and that compiles with the constraints for that class of XML
.Document expressed in the document type declaration is said to be valid. In other word a valid XML document must comply with a defined logical
structure.All XML documents must be well formed.a validating XML processor can be use the DTD to
confirm that document confirms to the relevent DTD.
what is DTD
A DTD is a description of the allowed structure of class XML documents.in DTD you declare elements,attributes which is allowed in class of XML documents.
XML validated against a DTD is Valid XML.
A "Well Formed" XML document is a document that conforms to the XML syntax rules that were described in the previous chapters:
|
<?xml version="1.0"?>
<school>
<student1>rama</student1>
<address>4131 e 200 w</address>
<phone>801-222-222</phone>
|
XML document also conforms to a DTD.
A "Valid" XML document is a "Well Formed" XML document, which also confrms to the rules of a Document Type Definition (DTD):
|
<?xml version="1.0"?> <!DOCTYPE student information "school.dtd">
<school>
<student1>rama</student1>
<address>4131 e 200 w</address>
<phone>801-222-222</phone>
|
|
|