I am populating a xmldocument and only if the selectsinglenod e of the given path exist i try to clone. I do this to accommodate same name tags. The issue in which i got stuck is I am able to build the xml with accommodating same name tags but i am unable to group them because logically it appends to the parent. I need a way to figure out to differentiate the same name tags in the xpath string and group them. e.g
if i have a list of xpath strings like this
Code:
i am able to get the xmldocument build which is like this
Code:
if i have some index in the xpath string something like this
Code:
I need to group them like this
Code:
can this be done using appendchild method in c# to group based on the predicate index or any other method
thank you
if i have a list of xpath strings like this
Code:
Code:
root/parent/one root/parent/two root/parent/three root/parent/one root/parent/two root/parent/three root/parent/one root/parent/two root/parent/three
Code:
Code:
<root> <parent> <one/> <two/> <three/> <one/> <two/> <three/> <one/> <two/> <three/> </parent> </root>
Code:
Code:
root/parent/one root/parent/two root/parent/three root/parent/one[2] root/parent/two[2] root/parent/three[2] root/parent/one[3] root/parent/two[3] root/parent/three[3]
Code:
Code:
<root>
<parent>
<one/>
<two/>
<three/>
</parent>
<parent>
<one/>
<two/>
<three/>
</parent>
<parent>
<one/>
<two/>
<three/>
</parent>
</root>
thank you
Comment