Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: How to insert element between two elements ? >Thread Next - Re: How to insert element between two elements ? Re: How to insert element between two elements ?To: NULL Date: 5/20/2008 10:32:00 AM "Joe Fawcett" <joefawcett@n...> a écrit dans le message de news: OWZ9xqkuIHA.524@T...... > "E.F" <fenouillet.et@l...> wrote in message > news:Owpvb$juIHA.4260@T...... >> "E.F" <fenouillet.et@l...> a écrit dans le message de news: >> u5rLH7juIHA.5892@T...... >>> Hi, >>> >>> I need to insert the following element : >>> <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 >>> >> >> Sorry ! >> I forgot to say that I manage my xml file with vb.net >> >> > Do you know it will go between TROIS and CINQ or do you have to translate > the element names into numerals first? > (This seems like a really bad XML structure: > <Test> > <Etape numero="1"><article numero="1"/><article numero="1"/><article > numero=""3/></Etape> > <Etape numero="2"><article numero="1"/><article numero="1"/><article > numero=""3/></Etape> > </Test> > would be much easier to work with. > > -- > > Joe Fawcett (MVP - XML) > > http://joe.fawcett.name Thank you for your reply. Each time i use my application, i have to check that all the previous elements have not been deleted. Then I read my xml file with xmlreader, and if any element is missing (element FOUR for exemple), I have this msgBox : "Element FOUR, is missing. Do you want to add it ?", vbyesno If I replay Yes, i know where I have to insert the missing element (with any attributs) in then xml, but I'm unable to do it. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
