In order to move a node from one XML document to another using the lxml library, you need to detach the node from its original parent and then append it to the new parent. You can do this by calling the getparent() method to get the parent of the node and then calling the remove() method on the parent to detach the node. After that, you can append the detached node to the new parent by calling the append() method. https://retrobowl.pro/ _______________________________________________ lxml - The Python XML Toolkit mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/lxml.python.org/ Member address: [email protected]
[lxml] Re: [lxml-dev] Reparenting a node
antoniesmith7718--- via lxml - The Python XML Toolkit Mon, 30 Jan 2023 02:37:27 -0800
