What is ?Well Formed XML? and ?Valid XML?

Answer Posted / manoj joshi

W3C, in the XML specification, has defined certain rules
that need to be followed while creating XML documents. The
examples of such rules include: having exactly one root
element, having end-tag for each start- tag, using
single/double quotes for attribute values, and so on. If an
XML document follows all these rules, it is said to be well-
formed document and XML parsers can be used to parse and
process such documents.
Document Type Definitions (DTDs) or XML Schemas can be used
to define the structure and content of a specific class of
XML documents. This includes the parent-child relationship
details, attribute lists, data type information, value
restrictions, etc. In addition to the well-formedness
rules, if an XML document also follows the rules specified
in the associated DTD/Schema, it is said to be a valid XML
document. All valid XML documents are well-formed; but the
reverse is not always true, that is, well-formed XML
documents do not necessarily have to be valid.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is targetnamespace in xsd file?

624


Explain how to rename a particular element and attribute from XML using XSL?

640


What is the main use of xml?

590


What is the best rss reader?

587


Why is xml so popular?

651


what is the difference between xpath document and xml document?

10444


How do I convert an xml file to pdf?

694


How to use element in xslt? : xslt

662


When should I use the default xml namespace instead of prefixes?

665


Can xml use non-latin characters?

689


Is sql worth learning?

666


How do I download an xml file?

645


Does the xml namespaces recommendation define anything except a two-part naming system for element types and attributes?

660


How do xml files work?

635


Aren't xml, sgml, and html all the same thing?

788