Allow for NULL fval when creating new node
Check for ppath before getting xmldoc to prevent memory leak.