What is XML Document? Science Tutor

What is XML Document?

An XML Schema is a language for expressing constraints about XML documents. There are several different schema languages in widespread use, but the main ones are Document Type Definitions (DTDs), Relax-NG, Schematron and W3C XSD (XML Schema DefinitionXML Document Type Declaration, commonly known as DTD, is a way to describe precisely the XML language. DTDs check the validity of structure and vocabulary of an XML document against the grammatical rules of the appropriate XML language.
An XML document can be defined as:
Well-formed : If the XML document adheres to all the general XML rules such as tags must be properly nested, opening and closing tags must be balanced, and empty tags must end with '/>', then it is called as well-formed .
OR
Valid : An XML document said to be valid when it is not only well-formed , but it also conforms to available DTD that specifies which tags it uses, what attributes those tags can contain, and which tags can occur inside other tags, among other properties.
The following diagram represents that a DTD is used to structure the XML document:
DTD can be classified on its declaration basis in the XML document, such as:
  • Internal DTD - When a DTD is declared within the file it is called Internal DTD
  • External DTD - When a DTD is declared in a separate file it is called External DTD



Post a Comment

0 Comments