[xml] xmlNodePtr valid after its document has been modified?

Hi all!

a) Given a xmlNodePtr, is it still valid after modifying the document?
b) Given the xmlChar* Value of an attribute, is it still valid after modifying the node/document ?

xmlDoc* doc;
xmlNode* doc_node = (... obtain node of doc ...);
xmlChar* node_attrib_val = xmlGetProp(doc_node, "TEST");
// Modify the doc, possibly adding and removing other nodes
doc_node->... (Is the NodePtr still valid?)
// Modify the node by adding or removing Attributes/Properties
printf("%s", (const char*)node_attrib_value); // attribute value still valid??

Does libxml2 guarantee this? (v 2.6.27)

- Martin

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