Re: xml.dom.minidom weirdness: bug?
- From: Marc Christiansen <usenet@xxxxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 14:43:28 +0200
JYA <nospam@xxxxxxxxxxx> wrote:
for y in x.getElementsByTagName('display-name'):
elem.appendChild(y)
Like Gabriel wrote, nodes can only have one parent. Use
elem.appendChild(y.cloneNode(True))
instead. Or y.cloneNode(False), if you want a shallow copy (i.e. without
any of the children, e.g. text content).
Marc
.
- References:
- xml.dom.minidom weirdness: bug?
- From: JYA
- xml.dom.minidom weirdness: bug?
- Prev by Date: Re: computing with characters
- Next by Date: Re: how to convert a multiline string to an anonymous function?
- Previous by thread: Re: xml.dom.minidom weirdness: bug?
- Next by thread: QA-Test Jobs at Cisco-IronPort
- Index(es):