in reply to XML Cleanup

If your XML file is not huge, you could consider reading it in a variable, prepend/append the open/close root tag and then parse it. Most (if not all) XML parsers allow parsing from a string var

Rule One: Do not act incautiously when confronting a little bald wrinkly smiling man.