Groups | Blog | Home
all groups > dotnet xml > april 2004 >

dotnet xml : How to reference to a part of the XML doc?


panzy
4/6/2004 1:14:19 PM
Hi,

I have this structure:

<a>
<repeated_part>
<just_the_same_thing_and_more/>
</repeated_part>
</a>
<b>
<repeated_part>
<just_the_same_thing_and_more/>
</repeated_part>
</b>

Is it possible to refactor this at text doc level to something like this:

<repeated_part>
<just_the_same_thing_and_more/>
</repeated_part>
<a>
<reference to the repeated_part>
</a>
<b>
<reference to the repeated_part>
</b>

Pls note: I want parse this DOC and work with the DOM.
After parsing and using the DOM the tree should be very similar to the first
case:
The node <A> should have a child node <repeated part>

Is there any standard XML solution?

thx for answers


Oleg Tkachenko [MVP]
4/13/2004 10:29:25 AM
[quoted text, click to view]

There are two standard XML solutiuons here - XSLT and DOM manipulation.
Take which is easier to you. I'd go for XSLT.

--
Oleg Tkachenko [XML MVP, XmlInsider]
AddThis Social Bookmark Button