[xml] xmlNodePtr valid after its document has been modified?
- From: Martin Trappel <0xCDCDCDCD gmx at>
- To: xml gnome org
- Subject: [xml] xmlNodePtr valid after its document has been modified?
- Date: Wed, 05 Nov 2008 16:56:11 +0100
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 ?
[code]
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??
[/code]
Does libxml2 guarantee this? (v 2.6.27)
Thanks!
- Martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]