Hi,
I made a small script which generates some tag-like output (wouldn't call it xml) and it looks like this, all on one ugly line:After the output is written to a file, I wanted to open it again and format it so it's more readable (ie. 'beautify' it):<circle>wonderful<apple color="red">very good</apple></circle>
I tried using the simple XML parser, but it reorders my tags in alphabetical order, and it also replaces my "id" attributes with "name"! I just need some basic indentation support.<circle> wonderful <apple color="red"> very good </apple> </circle>
I found on CPAN: http://search.cpan.org/~bjoern/SGML-Parser-OpenSP-0.994/lib/SGML/Parser/OpenSP.pm which I *think* will parse my sgml stuff and maybe dump it nicely in the indented format I want, but I cannot get it to build on my poor mac.
Anyone know of an easier way, or if that library above is the one to go with?
ThanksIn reply to Beautifying some SGML? by markww
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |