473,385 Members | 1,506 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to insert element after specific element in xml ?

E.F
Hi,

i try to manage xml with vb.net and i have to insert
this element between 2 elements:
<QUATRE Attr_1="400" Attr_2="100" />
in my xml file witch is looking like that :

<TEST>
<Etape_1>
<NEUF Attr_1="400" Attr_2="100" />
<DIX Attr_1="400" Attr_2="100" />
<ONZE Attr_1="400" Attr_2="100" />
</Etape_1>
<Etape_2>
<UN Attr_1="400" Attr_2="100" />
<DEUX Attr_1="400" Attr_2="100" />
<TROIS Attr_1="400" Attr_2="100" />
-----here is the place where my element shoud be inserted<-----------
<CINQ Attr_1="400" Attr_2="100" />
</Etape_2>
</TEST>

Does anybody can show me the way to do ?

Thank you for your attention,

Etienne

Jun 27 '08 #1
2 1537
On 20 maio, 03:25, "E.F" <fenouillet...@laposte.etwrote:
Hi,

i try to manage xml with vb.net and i have to insert
this element between 2 elements:
<QUATRE Attr_1="400" Attr_2="100" />
in my xml file witch is looking like that :

<TEST>
<Etape_1>
<NEUF Attr_1="400" Attr_2="100" />
<DIX Attr_1="400" Attr_2="100" />
<ONZE Attr_1="400" Attr_2="100" />
</Etape_1>
<Etape_2>
<UN Attr_1="400" Attr_2="100" />
<DEUX Attr_1="400" Attr_2="100" />
<TROIS Attr_1="400" Attr_2="100" />
-----here is the place where my element shoud be inserted<-----------
<CINQ Attr_1="400" Attr_2="100" />
</Etape_2>
</TEST>

Does anybody can show me the way to do ?

Thank you for your attention,

Etienne
which class are you using to parse your xml?
take a look: http://msdn.microsoft.com/en-us/libr...er(VS.80).aspx

Thiago
Jun 27 '08 #2
E.F

"Thiago Macedo" <th**********@gmail.coma écrit dans le message de news:
cb**********************************...oglegroups.com...
On 20 maio, 03:25, "E.F" <fenouillet...@laposte.etwrote:
>Hi,

i try to manage xml with vb.net and i have to insert
this element between 2 elements:
<QUATRE Attr_1="400" Attr_2="100" />
in my xml file witch is looking like that :

<TEST>
<Etape_1>
<NEUF Attr_1="400" Attr_2="100" />
<DIX Attr_1="400" Attr_2="100" />
<ONZE Attr_1="400" Attr_2="100" />
</Etape_1>
<Etape_2>
<UN Attr_1="400" Attr_2="100" />
<DEUX Attr_1="400" Attr_2="100" />
<TROIS Attr_1="400" Attr_2="100" />
-----here is the place where my element shoud be inserted<-----------
<CINQ Attr_1="400" Attr_2="100" />
</Etape_2>
</TEST>

Does anybody can show me the way to do ?

Thank you for your attention,

Etienne

which class are you using to parse your xml?
take a look:
http://msdn.microsoft.com/en-us/libr...er(VS.80).aspx

Thiago
Thank you Thiago for your help
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Jack | last post by:
I have a text file of data in a file (add2db.txt) where the entries are already entered on separate lines in the following form: INSERT INTO `reviews` VALUES("", "Tony's", "Lunch", "Great...
1
by: Kumar | last post by:
Hi All I have to add elements to an existing XML Document which conforms to a DTD. Is there an some API which throws an exception when I append a node to this document if it is not a valid...
2
by: Brian | last post by:
I'm trying out a script called mktree.js < http://www.mattkruse.com/javascript/mktree/ > I want to add an expand all button to the script, using the DOM insertBefore method. I added a function to...
2
by: Lloyd | last post by:
I am trying to insert text in a text area. I need to insert one set of values on the left side of the text area and have corresponding values on the left side of the text area in an even column....
4
by: mike | last post by:
Hello. Let's say I have the following XML document: <ROOT><Element1>Some Text</Element1></ROOT> I want to add a new element after Element1. I tried the following but, naturally, it doesn't...
28
by: Giggle Girl | last post by:
Can someone show me how to insert a row at any given row index of an already created table? It only has to work in IE6 (used on intranet at work). Specifically, if a table is 20 rows in total...
2
by: mirandacascade | last post by:
O/S: Win2K Vsn of Python: 2.4 Example: <a> <b createAnotherWhenCondition="x"> <c>text for c</c> <d>text for d</d> </b>
6
by: flash | last post by:
write a program that manipulates arrays of integers. The main program should call three functions: Insert, Delete, and Search. The Insert function should call a function Sort that sorts the array. ...
0
by: monkeyboysdad | last post by:
I have an xml document - <?xml version="1.0"?> <mstns> <curves id="curve0"> </curves> <classification name="ROUND STN STL BAR"> <material name="DIA 3MM STN STL 316 h9"> ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.