Software for XML tools
This page consists of links to (free) sofware to handle XML tools (XML documents, XML Schema, DTD, XPath, etc) in a quick and easy way.
Newer tools may have appeared during the last 5 years, which have not been considered below.
XML documents (editing and well-formedness)
Any text editor will work for editing XML documents and many have syntax highlighting and/or automatical formatting by indentation.
- Editing XML documents is very easy in the free Visual Studio Express Edition, because it has syntax highlighting and intellisense, which will automatically add the end element, when the start element has been entered. Simultaneously with your entering it also checks if the XML document is well-formed (it is also able to validate the document, see the section on DTD and XML Schema below).
- Well-formedness can be checked by opening the file in any modern browser. If the document is well-formed, then the content will be displayed, and else an error message will appear.
W3Schools has an online syntax checker, which checks if the document is well-formed XML.
DTD and XML Schema
My favourite program is again Visual Studio Express Edition because
- it has syntax highlighting, syntax checking and intellisense, when the schema-element with the correct namespace is entered. Intellisense shows the possible elements or attributes which are legal to enter.
- it can check if a XML document is valid according to a XML Schema if both are opened and the XML document contains a reference to the XML Schema, i.e. the root element is like:
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schemafile.xsd">
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="targetnamespace schemafile.xsd">
where schemafile.xsd is the XML Schema and targetnamespace is the targetnamespace in the XML Schema if it is not empty.
- it can check if a XML document is valid according to a Document Type Definition (DTD) if both are opened and the XML document contains a reference to the DTD, i.e. if the DTD is the file doctype.dtd:
<!DOCTYPE root SYSTEM "doctype.dtd">
- it can produce a XML Schema from the XML document.
NetBeans is able to do the same things, and furthermore it can from a XML document produce a DTD so the XML document is valid according to the DTD.
A very useful online service for validating a XML document against a XML Schema is the CoreFiling website, where you can upload a XML document and a XML Schema and the site will check if the XML is well-formed and whether it is valid according to the XML Schema.
XPath and XQuery
I do not know about an editor or tool which are able to syntax check XPath or XQuery expressions.
XPath 2.0 is a subset of XQuery 1.0, so it is enough to have a tool for the latter. I recommend the following tool:
XSLT exists in version 1.0 and 2.0, and it seems like version 2.0 is not so widespread yet (2009).