Home | History | Annotate | Download | only in libxml2

Lines Matching refs:old

3782  * @old:  the old node
3785 * Unlink the old node from its current context, prune the new one
3789 * Returns the @old node
3792 xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) {
3793 if (old == cur) return(NULL);
3794 if ((old == NULL) || (old->parent == NULL)) {
3797 "xmlReplaceNode : old == NULL or without parent\n");
3802 xmlUnlinkNode(old);
3803 return(old);
3805 if (cur == old) {
3806 return(old);
3808 if ((old->type==XML_ATTRIBUTE_NODE) && (cur->type!=XML_ATTRIBUTE_NODE)) {
3813 return(old);
3815 if ((cur->type==XML_ATTRIBUTE_NODE) && (old->type!=XML_ATTRIBUTE_NODE)) {
3820 return(old);
3823 xmlSetTreeDoc(cur, old->doc);
3824 cur->parent = old->parent;
3825 cur->next = old->next;
3828 cur->prev = old->prev;
3833 if (cur->parent->properties == (xmlAttrPtr)old)
3836 if (cur->parent->children == old)
3838 if (cur->parent->last == old)
3842 old->next = old->prev = NULL;
3843 old->parent = NULL;
3844 return(old);
4788 * Returns the old root element if any was found, NULL if root was NULL
4792 xmlNodePtr old = NULL;
4800 old = doc->children;
4801 while (old != NULL) {
4802 if (old->type == XML_ELEMENT_NODE)
4804 old = old->next;
4806 if (old == NULL) {
4814 xmlReplaceNode(old, root);
4816 return(old);
7241 * and free the old one.
7584 xmlNsPtr oldNs; /* old ns decl reference */
7648 * @oldNs: the old ns-struct
7909 const xmlChar *old = str; \
7912 (!xmlDictOwns(sourceDoc->dict, old))) \
7913 xmlFree((char *)old); \