Re: [xml] adding new nodes at a specific place

fre 2002-06-14 klockan 23.22 skrev Marcus vA:

  <johndoe attr="3">

  <tingletangle attr="anotherattr">
   <anoth_node tofu="moretofu">...</anoth_node>

Now I want to add a new <johndoe> - node between 
the last <johndoe> (here with the id 3) and <tingletangle>.

Find  <tingletangle> (using xpath for example).
Then you can insert the new node using xmlAddPrevSibling().


Jens Askengren

Teknik i Media Sverige AB (publ)
Address: Södra förstadsgatan 2, SE-211 34 Malmö, Sweden
Tel: +46 40 601 57 00 (vx)
Mobile: +46 704 20 57 17
Fax: +46 40 601 57 99

DISCLAIMER: "The information contained in this email and any attachment
confidential. It is intended only for the named addressee(s). If you are
not the named addressee please notify the sender immediately and do not
disclose, copy or distribute the contents to any other person other than
the intended addressee(s)."

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]