jma schrieb:
I have very little to do with XSLT... so I need some help here. The
thing is I produce a log file in XML and want to present it in a tree
structure. When I open it, I see the tree structure in my browser
since no XSLT is defined. Now, what I want, is exactly the same thing
without the XML tags. Googlig on the subject this seems to be really
complicated?!? Any help highly appreciated.
Have a look at this:
http://home.vrweb.de/~juergen.kahrs/...of-an-XML-file
The idea of the script is to turn an XML file into
indented ASCII output like this:
book lang='en' id='hello-world'
bookinfo
title
chapter id='introduction'
title
para
sect1 id='about-this-book'
title
para
sect1 id='work-in-progress'
title
para
All that is needed is this script:
@load xml
XMLSTARTELEM {
printf("%*s%s", 2*XMLDEPTH-2, "", XMLSTARTELEM)
for (i=1; i<=NF; i++)
printf(" %s='%s'", $i, XMLATTR[$i])
print ""
}
I hope this is what you need.