Jump to content

XML validation: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Drrwebber (talk | contribs)
Drrwebber (talk | contribs)
Line 28: Line 28:
:*[http://xmlsoft.org/xmldtd.html The XML C parser and toolkit of Gnome] – libxml includes xmllint
:*[http://xmlsoft.org/xmldtd.html The XML C parser and toolkit of Gnome] – libxml includes xmllint
:*[http://www.zlatkovic.com/libxml.en.html Windows port of libxml] – maintained by Igor Zlatkovic
:*[http://www.zlatkovic.com/libxml.en.html Windows port of libxml] – maintained by Igor Zlatkovic
:*[http://www.cameditor.org/#XML_Validation] – CAMV Java XML validation engine
:*[http://www.cameditor.org/#XML_Validation CAMV Java XML validation engine] – SourceForge.net project
; Online validators for XML files
; Online validators for XML files
:*http://www.w3.org/2001/03/webdata/xsv
:*http://www.w3.org/2001/03/webdata/xsv

Revision as of 03:35, 18 February 2013

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

References

  1. ^ "Well-Formed XML Documents". Extensible Markup Language (XML) 1.1. W3C. 2004.
  2. ^ "Constraints and Validation Rules". XML Schema Part 1: Structures Second Edition. W3C. 2004.
Example C program
XML toolkit
Online validators for XML files
Articles discussing XML validation