XML
This article or section is currently under construction
In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")
Definition
- XML means "Extended markup language". XML is designed as a machine readable self describing text editable persistent store for data. XML is a formalism or a meta-language (not to be confounded with HTML, a language to describe the structure of Web pages)
XML concepts
An XML document can refer to a physical file, a database entry, a datastream (any appropriate "text" that is delimited).
Wellformedness and validity
An XML document is well formed if and only if
- There is an appropriate XML declaration at the beginning
- The document starts with an XML declaration that includes a version number (currently 1.0).
<?xml version="1.0"?> :This declaration can also contain encoding information. By default encoding isUTF-8): <?xml version="1.0" encoding="ISO-8859-1"?>
- XML documents are hierarchical
- begin-tags and end-tags that match
- No crossing like
...... ....
- There must be single root
- It can only appear once and can not be used within other elements
- Other features
- XML is case sensitive, "LI" is not "li" for example
- "Empty" tags must be self closing, e.g.
- Attribut values are quoted
<a href= " http://tecfa.unige.ch:8080/xml.html " >)
- Special caracters: <, &, >,", '
- Use < & > &aquot; ' instead of <, &, >,", '
- Including URLs !!
Text-centric vs. data-centric XML
Data-centric XML as opposed to the text-centric XML refers to XML whose primary audience is not a human reader, but a computer program which will process the information, respond to it, store data items in a database, and so on.
Software
(longer entries have their own page)
XML creation
- See XML editor
Validation
- Off-line validation
- Most decent XML editors do offer validation functionality. However, some free XML editors do not. Some (like Xemacs) only offer limited verification.
- [xmllint]
- xmlTester.jar. This tools is based on the Xerxes parser.
- XML Nanny. XML Nanny is a Free Mac OS X developer tool that provides an Aqua interface for checking XHTML and XML documents for Well-Formedness and Validity either locally or across the network. (Tiger OS X 10.4) [sept 2005]
- On-line validation
Note: You may need to change DTD's local system identifier. These programs must be able to get the DTD. I rather suggest installing a local program on your machine (like xmllint or xmlTester).
- STG XML Validation Form, curtosy of Scholarly Technology Group, Brown University
- XML well-formedness checker and validator, Richard Tobin, University of Endinburgh (RXP parser)
- XML.com's (simple well-formedness)
- On-line validation for specific XML applications
- W3C HTML Validation Service This validator doesn't work with your own DTD's. Its primary function is to validate W3C vocabularies (HTML, XHTML, SVG, MathML, ... )
- FEED Validator. Validates various RSS Formats plus PIE
Links
Tutorials
- XML:Managing Data Exchange. Thi Wikibook project introduced XML from a Data exchange perspective.
News
- Cafe con Leche XML News and Resources (Best resource to keep in touch with XML-related news)
- TECFA's XML Page (DSchneider's "old" XML pointers page).
References
- Elliotte Rusty Harold, (2004). XML in a Nutshell, O'Reilly, Abstract/TOC ISBN 0-596-00764-7 (Best buy according to DSchneider).