Add Child Node to multinode XML Document

F

fischertm

I'm trying to add a chile node to a document that looks like the
following:

<Configuration>
<Main>
<one> ONE </One>
<Two> TWO </Two>
</Main>
<Multiples>
<Entry>
<Name> TEST </Name>
<Date> DATE </Date>
<Other> OTHER </Other>
</Entry>
<Entry>
<Name> xxxxx </Name>
<Date> yyyyy </Date>
<Other> zzzzz </Other>
</Entry>
</Multiples>
</Configuration>
----------------------------------------------------------------------------

I need to add a new <Entry> into the <Multiples> Node. the problem I am
having is that when adding using the InnerXML and XMLTextWriter, I add
a new <Entry > below the </Multiples> node.

Any help is appreciated.
 
C

Christopher Ireland

(e-mail address removed) wrote:
| I'm trying to add a chile node to a document that looks like the

Have you considered using xpath queries [http://www.w3schools.com/xpath/] to
manipulate your xml nodes? These can be used in conjunction with the
System.Xml.XPath namespace. I've found the combination to be very powerful
and easy to use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top