Help formatting a file - 31/05/05 05:43 PM
ok, I have a xml file, and I have a parser, but sometimes the xml is all on one line so that my parser cant understand it... I need a script that will turn this:
into:
the only thing that i really want is the <title>blah</title>, the <link>blah</link>, and the </item>, and there can be many or few <tag>'s and </tag>'s and there can be lots of <item> ... </item> after each other...
Code:
<tag><tag><tag><item><title>blah</title><link>blah</link><something>blah</something></item></tag></tag></tag>
into:
Code:
<tag> <tag> <tag> <item> <title>blah</title> <link>blah</link> <something>blah</something> </item> </tag> </tag> </tag>
the only thing that i really want is the <title>blah</title>, the <link>blah</link>, and the </item>, and there can be many or few <tag>'s and </tag>'s and there can be lots of <item> ... </item> after each other...