D
d_cymbal
Hi,
There is probably an easy answer to this but I am stumbling all over
myself trying to find it.
I am trying to create a quick and dirty xslt to pretty up some
generated xml documents for display. Nothing fancy, I just want to
create some basic HTML tables from the xml.
Just about all the xml comes in two forms:
(1)
<root>
<key1>value1</key1>
<key2>value2</key2>
<key3>value3</key3>
</root>
or (2) on slightly more complicated
<root>
<key1>value1</key1>
<key2>value2</key2>
<subelement>
<key1>value1</key1>
<key2>value2</key2>
<key3>value3</key3>
</subelement>
<key3>value3</key3>
</root>
So what I want to be able to do is iterate over the entire doc and be
able to extract each key name and value pairs for display. I also want
to know if I am an a more complex element than a simple key/value so
that I can generate a new table for that. I have bits and pieces of
this working in separate xslts but things seem to fall apart when I
attempt to combine everything into one xslt to rule them all
Any samples I have missed via google that shows how to do this? It's
really nothing more than a glorified echo it seems....
Thanks.
dc
There is probably an easy answer to this but I am stumbling all over
myself trying to find it.
I am trying to create a quick and dirty xslt to pretty up some
generated xml documents for display. Nothing fancy, I just want to
create some basic HTML tables from the xml.
Just about all the xml comes in two forms:
(1)
<root>
<key1>value1</key1>
<key2>value2</key2>
<key3>value3</key3>
</root>
or (2) on slightly more complicated
<root>
<key1>value1</key1>
<key2>value2</key2>
<subelement>
<key1>value1</key1>
<key2>value2</key2>
<key3>value3</key3>
</subelement>
<key3>value3</key3>
</root>
So what I want to be able to do is iterate over the entire doc and be
able to extract each key name and value pairs for display. I also want
to know if I am an a more complex element than a simple key/value so
that I can generate a new table for that. I have bits and pieces of
this working in separate xslts but things seem to fall apart when I
attempt to combine everything into one xslt to rule them all
Any samples I have missed via google that shows how to do this? It's
really nothing more than a glorified echo it seems....
Thanks.
dc