Peter Hurford
1/9/2003 7:26:00 PM
XMLDocument is your friend.
You're right - XMLTextWriter is analogous to a SAX parser,
it's quick but limited. XMLDocument is the DOM Document
implementation, full traversal functionality and ideal for
jumping around nodes.
Forget xsl - that's massive overkill when it sounds like
you want to cherry pick individual items. Square peg,
round hole.
>-----Original Message-----
>You might want to reconsider using code todo this kind of
transformations.
>You might want to use XSL. Its built for such
modifications and it gives
>you a lot of flexibility. BTW: You can use DOM calls to
navigate to the
>right position. and make edits there and then save it.
>You might want to search around on gotdotnet.com for
samples.
>
>
>On Fri, 10 Jan 2003 00:01:10 +0800, Dicky
<dicky_wong_hk@hotmail.com>
>wrote:
>
>> Hi,
>> I am writing an asp.net application, which will amend a
xml file. In my
>> situation, i am not going to create a new XML file.
Instead, i want to
>> add
>> some elements at the particular position in the
existing xml tree.
>>
>> I know XMLTextWriter is a simple class, which provides
non-caching
>> implementation in XML. That means it cannot jump to
specific position of
>> the
>> xml file.
>>
>> In my situation, can i solve this problem? Any suitable
class provided?
>>
>> Thank you
>>
>> Regards,
>> Dicky
>>
>>
>>
>>
>>
>
>
>
>--
>Girish Bharadwaj
>.
>