Re: [xml] changing the contents of a node



On Thu, Oct 18, 2001 at 08:31:17PM +0200, Stefan Kost wrote:
hi,

I am trying to do the following processing :
<main>
   <i18n>
      unlocalized-text
   </i18n>
</main>
should change to
<main>
   localized text
</main>

To achive this I walk down the doc-tree. Whenever I find a text-node (cur) I get the parent (i18n) and the 
grandparent (main).
Now it tried dozen ways to add a text-child to main. Can someone point me on the proper way to do it

  use xmlNewText and one of the xmlAddChild() or xmlAddSibling()
check the tree.h doc:
   http://xmlsoft.org/html/libxml-tree.html

 Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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