469,352 Members | 1,697 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

VB.NET: Writing attribute and Elements to Xml

Say i have this Xml file

<Books>
<Book type="1">
<Author>Peter</Author>
<Section>1</Section>
</Book>
</Books>

how to create another automatic set of IDs and datas for the Xml tag so that
when i type in another set of data...

The content of the Xml file will become:

<Books>
<Book type="1">
<Author>Peter</Author>
<Section>1</Section>
</Book>
<Book type="2">
<Author>John</Author>
<Section>2</Section>
</Book>
</Books>

Thanks

--
toytoy - forum member
http://www.visual-basic-data-mining.net/forum
Nov 12 '05 #1
2 9289
Did you manage to solve it? I am facing the same problem, so if you found a
solution, please could you let me know?

"http://www.visual-basic-data-mining.net/" wrote:
Say i have this Xml file

<Books>
<Book type="1">
<Author>Peter</Author>
<Section>1</Section>
</Book>
</Books>

how to create another automatic set of IDs and datas for the Xml tag so that
when i type in another set of data...

The content of the Xml file will become:

<Books>
<Book type="1">
<Author>Peter</Author>
<Section>1</Section>
</Book>
<Book type="2">
<Author>John</Author>
<Section>2</Section>
</Book>
</Books>

Thanks

--
toytoy - forum member
http://www.visual-basic-data-mining.net/forum

Nov 12 '05 #2
http://www.visual-basic-data-mining.net/forum wrote:
<Books>
<Book type="1">
<Author>Peter</Author>
<Section>1</Section>
</Book>
</Books>

how to create another automatic set of IDs and datas for the Xml tag so that
when i type in another set of data...

The content of the Xml file will become:

<Books>
<Book type="1">
<Author>Peter</Author>
<Section>1</Section>
</Book>
<Book type="2">
<Author>John</Author>
<Section>2</Section>
</Book>
</Books>


Load XML into XmlDocument, create and append new data and save it back.
See
http://msdn.microsoft.com/library/de...NodesInDOM.asp
how to create new nodes in XmlDocument.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Roy Adams | last post: by
2 posts views Thread by Antonio Collins | last post: by
5 posts views Thread by Saga | last post: by
7 posts views Thread by Alan Silver | last post: by
12 posts views Thread by Alex D. | last post: by
13 posts views Thread by John Rivers | last post: by
reply views Thread by shamirza | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.