B
bhushan.kharabe
Hi,
I am stuck in problem involving transformation where the tree structure
of the target is different than the tree structure of the source.
My input xml looks like
<?xml version="1.0" encoding="utf-8" ?>
<tree>
<treeInfo></treeInfo>
<fruitInfo id="1"></fruitInfo>
<fruitInfo id="2"></fruitInfo>
</tree>
My target xml should look like
<?xml version="1.0" encoding="utf-8" ?>
<tree>
<treeInfo>
<fruits>
<fruitInfo id="1"></fruitInfo>
<fruitInfo id="2"></fruitInfo>
</fruits>
</treeInfo>
</tree>
How can I achieve this transformation using XSLT?
I have tried but the closest output I am able to get is
<?xml version="1.0" encoding="UTF-8"?>
<tree>
<treeInfo/>
<fruits>
<fruitInfo id="1"/>
<fruitInfo id="2"/>
</fruits>
</tree>
Any ideas how I can achieve my goal??
Thanks in advance for all the help.
Regards,
Bhushan
I am stuck in problem involving transformation where the tree structure
of the target is different than the tree structure of the source.
My input xml looks like
<?xml version="1.0" encoding="utf-8" ?>
<tree>
<treeInfo></treeInfo>
<fruitInfo id="1"></fruitInfo>
<fruitInfo id="2"></fruitInfo>
</tree>
My target xml should look like
<?xml version="1.0" encoding="utf-8" ?>
<tree>
<treeInfo>
<fruits>
<fruitInfo id="1"></fruitInfo>
<fruitInfo id="2"></fruitInfo>
</fruits>
</treeInfo>
</tree>
How can I achieve this transformation using XSLT?
I have tried but the closest output I am able to get is
<?xml version="1.0" encoding="UTF-8"?>
<tree>
<treeInfo/>
<fruits>
<fruitInfo id="1"/>
<fruitInfo id="2"/>
</fruits>
</tree>
Any ideas how I can achieve my goal??
Thanks in advance for all the help.
Regards,
Bhushan