S
Simon
Hi,
I have generated an xml document, and would like to be able to transform it
to another such that the contents of a chosen node type are flattened (i.e.
tags removed). e.g.
<shop>
<name>super</name>
<sells>
<drink>squash</drink>
<drink>beer</drink>
<food>
<fresh>bread</fresh>
<fresh>apples</fresh>
<frozen>peas</frozen>
</food>
</sells>
</shop>
apply 'flatten' to <sells> to give...
<shop>
<name>super</name>
<sells>
squash
beer
bread
apples
peas
</sells>
</shop>
This seems like the kind of thing I could use xsl for. Could someone please
give me a xsl example showing how this would be done?
Thanks for your time,
Simon
I have generated an xml document, and would like to be able to transform it
to another such that the contents of a chosen node type are flattened (i.e.
tags removed). e.g.
<shop>
<name>super</name>
<sells>
<drink>squash</drink>
<drink>beer</drink>
<food>
<fresh>bread</fresh>
<fresh>apples</fresh>
<frozen>peas</frozen>
</food>
</sells>
</shop>
apply 'flatten' to <sells> to give...
<shop>
<name>super</name>
<sells>
squash
beer
bread
apples
peas
</sells>
</shop>
This seems like the kind of thing I could use xsl for. Could someone please
give me a xsl example showing how this would be done?
Thanks for your time,
Simon