flash - Copy XML array from one XML Object to another xml Object -


How to copy an XML object values ​​from one XML object to another empty XML object.

I have to copy an XML object from the XML array and paste it on another XML object parsing with to parse the XML object I am doing and I get nodes

ex> var myXML: xml = new xml (); For (...) if (xmlObj.product [i] .name == 'myproduct') {/// Copy 'MyXML' XML Object .. How ?? } Trace (myXML)

In this way I will probably do that, the AS3's E4 X Private 1 & lt; / Products & gt; Product Name =

Products "Product" and "Product" = "myProduct" & gt; Product name = "myProduct" & gt; Product 4 & lt; / Product & gt; & Lt; / ProductList & gt; Var myXML: XML = & lt; MyProductList & gt; & Lt; / MyProductList & gt; Each (var productItem: xmlObj.product in XML) {if (productItem. @ Name == 'myProduct') {myXML.appendChild (productItem.copy ()); }} Trace (myXML.toXMLString ())}

Extend child method can not add anything, so instead of leaving it as XML, accelerate an MXL word By form I add an XML object until it has its top-level node.

I would be happy to add a little more comment on this code, just tell me if it would be helpful.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -