I've been working with XML for a while now and I thought I'd share some of my experiences. This document will detail some best working practices relating to XML and the tools I use to help me work with it.
I tried a few of them with varying degrees of success, when I'm working on my Linux systems I use Vi, but most of my development work is done on Windows at Keynetix and I really needed a more complete solution to the process of developing XML rather than just editing files. I trialed XMLSpy with interesting results, working on small files it was great, the built in intellisense is a really useful tool and it's much more than just and editor, but I ran into problems when parsing and validating larges files including schema from many sources.
The one I went for in the end was JEdit.
There's something really clever about JEdit, it's plugin system, it's more than just an editor. On top of the base JEdit I have plugins for SideKick (show the document in a tree view), ErrorList (report errors during validation), XQuery (run XPath queries inside JEdit), XSLT (transform using XSLT stylesheets), XmlIndenter (automatically beautify XML documents), Xerces (for validating XML files using the Apache Xerces parser) and the XML plugin itself with loads of tools for editing and validating XML.
There's many ways to parse a file, the easiest way is to try and validate it! Since if it won't parse it definately won't validate! There are many validators (or Validating Processors) availiable and some of the more advanced editing suites (XMLSpy and Stylus Studio) even include their own.
Sadly all parsers are not equal! It's perfectly possible to write a valid document and have it be seen as valid in one parser, but not in another. This is down to the parsers "conformance level". I tried several different parsers and the one that I found worked the best was Xerces, the Apache project's implementation of an XML parser. It's reasonably easy to use, it's cross platform since it has a version written in Java and more often than not it's correct, from what I could find wherever there's been a "difference of opinion" between parsers, it's Xerces has come out as having had the correct implementation.
I've written a Short howto document on how to use Xerces-J as a validator, including the little batch file that REALLY makes life easier!
The tools are widely available to ensure the correct formatting and content of typed XML documents, in fact most of them are even free, JEdit and it's associated XML Plugins integrate with the Xerces validating parser to give a fully integrated XML development environment completely free of charge.