Another solution is to download jEdit (an excellent open-source text editor), it has a XML formatting plugin that will format a XML document with one little mouse click. If you are going to be working with a lot of XML documents, then I would highly suggest this. jEdit also has an XML plugin that will validate the document for you as well and allow jEdit to speak XML (i.e., syntax highlighting, tag completion, validation, etc).  http://www.jedit.org Chris -----Original Message----- On May 19, 2004, at 5:06 AM, Adriano Castro wrote: > > I have an XML file that has been created by a program. Problem is > the whole > file is one huge line of text instead of indented chunks of code. > > How can I format this automatically to be a bit more human > readable? > > I've tried opening it on the browser, copy the structured code and > then > paste it on my text editor. Unfortunately the hyphens (minus > characters) from > the treeview also come along with the code and are causing some > problems.