Friday, June 19, 2009

Exercise 11.1: XML introduction

Question 1
Conduct research on the Internet to find out what tools can be used to parse an XML document and ensure that the document is well formed and valid.

There are lots of tools on the Internet to parse and validate XML Documents. There are online parsers and standalone parsers.

The online parsers recommended by XML.com are as follows:
  • The XML Well-Formedness Checker and Validator at http://www.cogsci.ed.ac.uk/~richard/xml-check.html can perform either validation or simple well-formedness checks, controllable with a checkbox on the page.
  • The Brown University Scholarly Technology Group's (STG) parser at http://www.stg.brown.edu/service/xmlvalid/. This is strictly a validator and also lets you enter a URL pointing to the document to be validated. You can also copy and paste XML into a text area, or select (via a Browse button) a file on your local system.
  • The RUWF? ("Are You Well Formed?") parser available on XML.com. This well-formedness checker is based on the Perl XML::Parser module. Enter a URL and hit the RUWF? button to parse your document.
Some of the standalone parsers that validate are as follows:
  • Xerces : The Apache XML Project is maintaining XML parsers in Java, C++, and Perl. This is a free product from Apache.org; All Java, C++, and perl platforms are supported.
  • IBM's XML Parser for Java: Also known as XML4J. This is a free product from IBM and is supported on all Java platforms.
  • JavaSoft's XML Parser: This is a free product and supports all Java platforms.
  • Oracle XML Parser: This is a standalone XML component that enables parsing of XML documents through either SAX or DOM interfaces. This is a free product from Oracle and supports all Java platforms.
  • XML::Parser : This perl-based XML parser is from Larry Wall, the creator of perl.
  • xmlproc :This is an XML parser written in Python.
I could go on because there seem to be hundreds of XML parsers and validator tools on the internet.

You can also use the XmlValidatingReader class in .Net to verify the validity of XML documents and fragments.

References
Sall K. (2000). XML Software Guide: XML Parsers. Retrieved June 20, 2009, from http://wdvl.internet.com/Software/XML/parsers.html

Simpson J. E. (2000). Choosing an XML Parser. Retrieved June 20, 2009, from http://www.xml.com/pub/a/2000/08/23/whichparser/index.html
Xerces-C++ XML Parser (n.d.). Retrieved on June 20, 2009, from http://xerces.apache.org/xerces-c/

No comments:

Post a Comment