Q:

Error handling with libxml functions

Here are some links documenting the functions that I want to use:  

xmlNewNode
xmlNewChild
xmlNewProp

Since these functions use dynamic memory allocation, I want to do error checking, but I couldn't find information about behavior of these functions in case of an error. Do these functions simply return NULL on failure ?

A:

Yes, like most of the libxml2 functions which return pointers, these return NULL on failure. 

