tags:

views:

76

answers:

1

I don't need it to validate ( though that would be nice I don't think text wrangler does this) but to clean up messy .xml.

example this ...

<some><foo>
bar</foo></some>

to ...

<some>
   <foo>bar</foo>
</some>

thanks -MW

+1  A: 

If you're after a tool, most editors have some sort of "Tidy" feature.

  • In NotePad++: TestFX -> TestFX HTML Tidy -> Tidy: Reindent XML
  • In Visual Studio: Ctrl-K, Ctrl-D (or Edit -> Advanced -> Format Document)

A quick google for TextWrangler turns up this - http://magp.ie/2010/02/15/format-xml-with-textwrangler/

Reddog
thanks for the advise + link. After several attempts, I can't seem to get it going. keep getting a (MacOS Error code: -1409) .
MW
Try another editor... Many of them have similar such features...
Reddog
thanks for the advise - M
MW