Re: [xml] can't not insert text into self-terminating tag



On Wed, Nov 12, 2003 at 07:39:32AM +0800, John Scott wrote:
Hallo everybody,
 
after several trys without success, I feel to ask the list.
I have an empty tag <temp/>
 
, but I can't insert text using 
 
xmlNodeSetContent(cur->xmlChildrenNode, (const xmlChar *)content);
 
But i can insert text into this kind of empty tag:
<temp></temp>
 
Is there a way to insert text into <temp/> ???

  Hum, there shouldn't be any difference, at the tree level the representation
of <temp/> and <temp></temp> is identical.
  Seems to me cur->xmlChildrenNode is NULL, and hence the call should
fail in both case. You probably need
   xmlNodeSetContent(cur, ...)

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]