Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - How to create a simple tree >Thread Next - Re: How to create a simple tree Re: How to create a simple treeTo: NULL Date: 9/9/2008 7:42:00 PM 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/gawk/XML/xmlgawk.html#Printing-an-outline-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. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
