I think I never asked a question with such an incomprehensible title, sorry about that.
Let say the XML file I have look like that (not that I don't want to copy/paste, but it's too big):
<A attr1="aaa" attr2="bbb">
<B attr8="23156">
<C attr10="bla"/>
<C attr10="bli"/>
<C attr10="blo"/>
</B>
</A>
<A attr1="jhg" attr2="ygyug">
<B attr8="126">
<C attr10="bla"/>
</B>
<B attr8="102">
<C attr10="bla"/>
<C attr10="blo"/>
</B>
</A>
Well, you got the point, a generic XML file. I don't know the tags, the tags order, and the attributes. I have to use XSLT to turn this XML into a HTML file with all the "nodes" and attributes of the xml as text, in an equivalent tree :
<div>
<A attr1="aaa" attr2="bbb">
<div>
<B attr8="23156">
<div><C attr10="bla"/></div>
<div><C attr10="bli"/></div>
<div><C attr10="blo"/></div>
</div>
</div>
<div>
<A attr1="jhg" attr2="ygyug">
<div>
<B attr8="126">
<div><C attr10="bla"/></div>
</div>
<div>
<B attr8="102">
<div><C attr10="bla"/></div>
<div><C attr10="blo"/></div>
</div>
</div>
I can get every nodes' name by selecting //node(), I can get attributes by selecting @*, but I can't figure out how to get the html as expected.
Any help you can give will be greatly appreciated :D
 
No comments:
Post a Comment