[xml] What would make xmlSetProp return null?



I have two versions of my codebase with pretty minimal changes. ÂHere's the call to xmlSetProp

ÂÂ Â xmlAttr *elem = xmlSetProp(element->xml_obj,
ÂÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (const xmlChar*)*name,
ÂÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (const xmlChar*)*value);

The var element->xml_obj is a xmlNodePtr.

In the old version of the code this produced a valid attribute. ÂIn the new version it doesn't. ÂThis is part of a non-trivial codebase that is integrated with google v8 so provided more context is difficult. ÂI've checked all of the values and they seem valid. ÂBut elem always ends up being null. ÂAny idea where/how I should start to debug?

On a related note, I would like to enable the libxml2 debugging functions, e.g. xmlDebugDumpNode. ÂWhat's the easiest way to do that? ÂDo I need to recompile or can I just include another header file from somewhere?

Thanks
:Marco

--
Marco Rogers
marco rogers gmail com

Life is ten percent what happens to you and ninety percent how you respond to it.
- Lou Holtz


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