Elements w same name and their attributes
Hi!
Trying to transform a document with a lot of elements with same name, and want to extract all their attributes.
I have this:
<g>
<rect id="1" x="100" y="100" ... />
<rect id="2" x="101" y="101" ... />
...
</g>
And would like something like this:
<PARENT>
<CHILD>
<ID>1</ID>
<X>100</X>
<Y>100</Y>
...
</CHILD>
<CHILD>
..
</CHILD>
...
</PARENT>
Having really hard time to figure out how to write xsl stylesheet to do this transform, hint plz!!!???
|