Re: [xml] [Tree] GetNodeContent/content attribute of an xmlNodePtr



On Tue, Apr 06, 2004 at 08:45:47AM +0200, golyath wrote:
Hi, 
 
I have noticed that the getNodeGetContent(xmlNodePtr cur) method and the attribute 
content of cur (cur->content) do not return the same thing. For example, the method 
returns correctly the content, but null pionter if I use cur->content on an Element type 
node!? 

  that's normal. element have children, not content. getNodeGetContent
recurse on the children.

I have an other question : why exists some accessor methods on structure attributes, but 
not for all? For example, to get the name of an xmlNodePtr, you have to do ->name : it 
doesn't exists a method like getNodeName(xmlNodePtr)? 

  there is no accessor methods for simply getting a pointer from a node.

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]