XML validation

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

XML validation is the process of checking a document written in XML (eXtensible Markup Language) to confirm that it is both well-formed and also "valid" in that it follows a defined structure. A well-formed document follows the basic syntactic rules of XML, which are the same for all XML documents.[1] A valid document also respects the rules dictated by a particular DTD or XML schema, according to the application-specific choices for those particular .[2]

In addition, extended tools are available such as OASIS CAM standard specification that provide contextual validation of content and structure that is more flexible than basic schema validations.

xmllint is a command line XML tool that can perform XML validation. It can be found in UNIX / Linux environments. An example with the use of this program for validation of a file called example.xml is

xmllint --valid --noout example.xml

The xmllint --stream option will reduce its memory footprint when validating very large files.

References

<templatestyles src="Reflist/styles.css" />

Cite error: Invalid <references> tag; parameter "group" is allowed only.

Use <references />, or <references group="..." />

See also

Schematron, a method for advanced XML validation

External links

XML toolkit
Articles discussing XML validation

<templatestyles src="Asbox/styles.css"></templatestyles>

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.