Home >>XML Tutorial >XML Validation

XML Validation

XML Validation

You should verify a well developed XML document against DTD or Schema.

A well-formed XML application is a document containing the correct syntax. Until understanding the XML validation, it is really critical to know about valid XML document.

Valid XML document

It must be well developed (all basic condition of syntax satisfies)

It should be compatible with predefined DTD or XML schemes

Rules for well formed XML

  • It has to start with the declaration on XML.
  • It has one particular root element to have.
  • All XML File start tags will match end tags.
  • Case-sensitive XML identifiers.
  • Both things need to be close down.
  • All components must be nested correctly.
  • The values for the attributes will be quoted.
  • Of unique characters XML instances will be used.

XML Validation


A DTD describes the legal elements of an XML document.

In simple terms we may say that a DTD describes the structure of the document with a set of lawful elements and attributes.

XML schema is an alternative to DTD, based on XML.

DTD and XML schema are generally all used to form a well-formed XML document.

We will prevent errors in XML documents so the XML programs would end.

XML schema

The language is known as XML.

Uses namespaces to allow reuse of current definitions.

It supports a large range of data types built in and description of derived data types.

No Sidebar ads