472,133 Members | 1,148 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

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 9316
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.