Re: [xml] Difference btw. xmlNewDocNode and xmlNewNode

On Fri, Mar 30, 2007 at 12:52:11PM +0200, Trappel Martin wrote:

I'm really a bit confused about xmlNewDocNode() vs. xmlDocNode() ...
Can anyone explain to me what's the difference in using these two (or point
me to where that kindo of basics would be explained)?

xmlNodePtr xmlNewNode (xmlNsPtr ns, const xmlChar * name)
xmlNodePtr xmlNewDocNode (xmlDocPtr doc, xmlNsPtr ns, const xmlChar * name,
const xmlChar * content)

  xmlNewNode allows to build a node outside of any document context
  xmlNewDocNode also allow to initialize a text node child with the given
                content if given


Red Hat Virtualization group
Daniel Veillard      | virtualization library
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]