Hi Guys
I don't know XSLT and would like to use my current case to learn.
The case in question is multi level XML with many empty elements that I need to get rid of.
e.g.
What is the easiest method to do this? I think my two options would be matching a template (possibly multiple templates because of the structure) or copying the elements I want to keep.
Is there no way to farm through multi level xml to delete empty (of attributes and data) nodes?
If someone could link me to a tutorial that could help me do something like this it would be appreciated, I have been searching the net but cant quite find what I am looking for.
Thanks
I don't know XSLT and would like to use my current case to learn.
The case in question is multi level XML with many empty elements that I need to get rid of.
e.g.
Code:
<xml>
<parent>
<child>
<toys>
<toy colour="" type="" size="" />
<toy colour="" type="" size="" />
<toy colour="" type="" size="" />
<toy colour="blue" type="sports" size="1kg" />
<toy colour="" type="" size="" />
<toy colour="" type="" size="" />
</toys>
</child>
<Friend>
<cars>
<toy colour="white" make="Audi" model="A4" Year="2007" />
<toy colour="" make="" model="" Year="" />
<toy colour="" make="" model="" Year="" />
</cars>
</Friends>
<parent>
What is the easiest method to do this? I think my two options would be matching a template (possibly multiple templates because of the structure) or copying the elements I want to keep.
Is there no way to farm through multi level xml to delete empty (of attributes and data) nodes?
If someone could link me to a tutorial that could help me do something like this it would be appreciated, I have been searching the net but cant quite find what I am looking for.
Thanks