Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
libxml2
Commits
6ca24a39
Commit
6ca24a39
authored
Aug 08, 2012
by
Daniel Veillard
Browse files
Namespace nodes can't be unlinked with xmlUnlinkNode
parent
89b6f73a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tree.c
View file @
6ca24a39
...
...
@@ -3754,6 +3754,8 @@ xmlFreeNode(xmlNodePtr cur) {
* Unlink a node from it's current context, the node is not freed
* If one need to free the node, use xmlFreeNode() routine after the
* unlink to discard it.
* Note that namespace nodes can't be unlinked as they do not have
* pointer to their parent.
*/
void
xmlUnlinkNode
(
xmlNodePtr
cur
)
{
...
...
@@ -3764,6 +3766,8 @@ xmlUnlinkNode(xmlNodePtr cur) {
#endif
return
;
}
if
(
cur
->
type
==
XML_NAMESPACE_DECL
)
return
;
if
(
cur
->
type
==
XML_DTD_NODE
)
{
xmlDocPtr
doc
;
doc
=
cur
->
doc
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment