Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 34383D49D for ; Tue, 18 Dec 2012 14:34:14 +0000 (UTC) Received: (qmail 6283 invoked by uid 500); 18 Dec 2012 14:34:13 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 6052 invoked by uid 500); 18 Dec 2012 14:34:13 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 6039 invoked by uid 99); 18 Dec 2012 14:34:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 14:34:12 +0000 Date: Tue, 18 Dec 2012 14:34:12 +0000 (UTC) From: "Curtis Aube (JIRA)" To: flex-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-33313) Cannot append child to xml MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-33313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Curtis Aube updated FLEX-33313: ------------------------------- Description: var xml1:XML = ; var xml2:XML = ; xml2.appendChild(xml1.childnode[0]); xml1.appendChild(); trace(xml1.toXMLString()); Output: Expected Output: Workaround: Make a copy of the childnode and append the copy to the second xml node. or Remove the childnode before appending it to the second xml node. Additional notes: When you hit this bug, it is very hard to debug since there is no apparent reason it is happening and no stack traces. Another solution to this problem may be to just throw a stack trace when you try to append the same xml to two different xml parents, so that it's easier to find and fix the problem. was: var xml1:XML = ; var xml2:XML = ; xml2.appendChild(xml1.childnode[0]); xml1.appendChild(); trace(xml1.toXMLString()); Output: Expected Output: Workaround: Make a copy of the childnode and append the copy to the second xml node. or Remove the childnode before appending it to the second xml node. Additional notes: This is very hard to debug since there is no apparent reason it is happening and no stack traces. Another solution to this problem may be to just throw a stack trace when you try to append the same xml to two different xml parents, so that it's easier to find and fix the problem. > Cannot append child to xml > -------------------------- > > Key: FLEX-33313 > URL: https://issues.apache.org/jira/browse/FLEX-33313 > Project: Apache Flex > Issue Type: Bug > Components: .Unspecified - Framework > Affects Versions: Adobe Flex SDK 3.2 (Release), Adobe Flex SDK 3.3 (Release), Adobe Flex SDK 4.6 (Release) > Reporter: Curtis Aube > > var xml1:XML = ; > var xml2:XML = ; > xml2.appendChild(xml1.childnode[0]); > xml1.appendChild(); > trace(xml1.toXMLString()); > Output: > > > > Expected Output: > > > > > Workaround: > Make a copy of the childnode and append the copy to the second xml node. > or > Remove the childnode before appending it to the second xml node. > Additional notes: > When you hit this bug, it is very hard to debug since there is no apparent reason it is happening and no stack traces. Another solution to this problem may be to just throw a stack trace when you try to append the same xml to two different xml parents, so that it's easier to find and fix the problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira