Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I would like to be able to create a node after the last one enter so lets say we have this xml file:

 

<?xml version="1.0" encoding="utf-8" ?>

<DVDList>

<DVD>

<DVDName>Matrix</DVDName>

<Duration>2:00:00</Duration>

<Rating>PG-13</Rating>

</DVD>

</DVDList>

 

I would like to be able to insert another DVD so that it would like this :

 

<?xml version="1.0" encoding="utf-8" ?>

<DVDList>

<DVD>

<DVDName>Matrix</DVDName>

<Duration>2:00:00</Duration>

<Rating>PG-13</Rating>

</DVD>

 

<DVD>

<DVDName>Matrix Reloaded</DVDName>

<Duration>2:15:00</Duration>

<Rating>PG-13</Rating>

</DVD>

</DVDList>

 

Is there any way to add this second package of element ???waiting for answer

Posted

Off the top of my head I can't remember the exact steps but you could load it into an XmlDataDocument and navigate to the DVDList (DocumentElement) and use the CreateElement and AppendChild methods.

 

Good Luck

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...