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:
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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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