Hi, Is there a free XML formatting (indent) tool available where I can past an XML string and have it formatted so I can read the XML document correctly?
Thanks
Edit ~ I am using XML Notepad on Windows XP.
Hi, Is there a free XML formatting (indent) tool available where I can past an XML string and have it formatted so I can read the XML document correctly?
Thanks
Edit ~ I am using XML Notepad on Windows XP.
What platform are you on? What text editor are you already using? Most decent text editors either support this out of the box or have add-ons available.
I believe that Notepad++ has this feature.
Notepad++ menu: TextFX -> HTML Tidy -> Tidy: Reindent XML
If you're using Windows take a look at Xml Notepad:
http://msdn.microsoft.com/en-us/library/aa905339.aspx
Download from:
FirstObject XML editor is a great little free XML editor tool.
Open or paste your XML into it and press F8 to indent (you may need to set the number of indent spaces as it may default to 0).
It looks simple, however it contains a custom written XML parser written in C++ that allows it to work efficiently with very large XML files easily (unlike some expensive "espionage" related tools I've used).
You can open the XML file in any Visual Studio Express product and the press Ctrl+A, Ctrl+K, Ctrl+F to get it nicely formatted.
Hey, it's free and it's a tool, so it fits the question. :-)
If you use Notepad++, I would suggest installing the XML Tools plugin. You can beautify any XML content (indentation and line breaks) or linarize it. Also you can (auto-)validate your file and apply XSL transformation to it.
Download the latest zip and copy the extracted DLL to the plugins directory of your Notepad++ installation. Also, download the External libs and copy them to your %SystemRoot%\system32\ directory.
Not directly an answer, but good to know nevertheless: After indenting, please make sure that the parser(s) and application(s) which will subsequently process the formatted XML will not yield different results. White space is often significant in XML and most conforming parsers bubble it up to the application.
If you are a programmer, many XML parsing programming libraries will let you parse XML, then output it - and generating pretty printed, indented output is an output option.