This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > March 2005 > Re: how to replace <node/> with <abc xyz="u"><name>node</





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: how to replace <node/> with <abc xyz="u"><name>node</
wk

2005-03-18, 7:21 am

i am just starting xslt.....what would be the xsl to transform


<abc1>
<xyz2/>
<uvw 3>adjkn</uvw3>
</abc1>

into

<node>
<node write="1">
<name>abc1</name>
<node write="1">
<name>xyz2</name>
</node>
<node write="1">
<name>uvw3</name>
</node>
</node>
</node>


simply put, the xsl should strip off any data inside nodes, inclouding
attributes, and should relpace all nodes by a <node
write="1"><name>abc1</name></node> pair, where node and name are part
of desired nominclature, and the original node name comes in the name
tag.
Also, this needs to work on a generic xml, so we cant hardcode the
exact node names to work on (like xyz, uvw etc.) ...is this possible at
all?

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews