Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / July 2003

Tip: Looking for answers? Try searching our database.

Appending a Node

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny - 31 Jul 2003 00:14 GMT
I have below a sample parent-child xml that I'm trying to
manipulate

<Persons>
<Person Id='1'/>
</Persons>

I will have a string that I want to append to my existing
xml shown below:
"<Person Id='1'/>"

My question is, instead of creating a new node using the
createnode method of the xml document, I want to append
the string that I have to the xml. I noticed that there  
is a "createtextnode" method but it doesn't do what I
need it to do. How can I create an element node with the
string that I have, because by using the "createnode"
method, I have to specify a name, etc..

Thanks,
Oleg Tkachenko - 31 Jul 2003 09:25 GMT
> I have below a sample parent-child xml that I'm trying to
> manipulate
[quoted text clipped - 14 lines]
> string that I have, because by using the "createnode"
> method, I have to specify a name, etc..

Seems like you are talking about InnerXml property. You can get InnerXml
property of Persons element, append your string and set is back - it'll be
parsed and all necessary nodes will be created. Beware, it involves parsing,
so make sure you are keeping wellformdness.
Signature

Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.