[xml] XML tree structure validity
- From: "Theodore H. Smith" <delete elfdata com>
- To: xml gnome org
- Subject: [xml] XML tree structure validity
- Date: Fri, 30 Dec 2005 16:29:41 +0000
Hi list,
Is there an inbuilt function to check the tree structure for validity
according to libxml's way of doing things?
Basically, just to make sure I didn't screw up the nodes by accident.
I'm still new to libxml2, and I'm writing code like this:
inline void My_XMLMoveChildren( xmlNode* From, xmlNode* Into ) {
xmlNode* Next = 0;
for ( xmlNode* Child = From->children; Child != 0 ; Child = Next ) {
Next = Child->next;
xmlUnlinkNode(Child);
xmlAddChild( Into, Child );
}
}
For all I know, it could work, or it might look like it works but
actually be creating an inconsistant tree node structure, something
that might not be immediately apparant but which could cause errors
later in my code.
Now, if there was some sort of validity or sanity checking function
in libxml2, I could pin down any bugs I create far more quickly.
Is there such a function?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]