XML.appendChild() 755
Example
This example adds a custom HTTP header named SOAPAction with a value of Foo to an XML
object named
my_xml.
my_xml.addRequestHeader("SOAPAction", "'Foo'");
This next example creates an array named headers that contains two alternating HTTP headers
and their associated values. The array is passed as a parameter to the
addRequestHeader()
method.
var headers = ["Content-Type", "text/plain", "X-ClientAppVersion", "2.0"];
my_xml.addRequestHeader(headers);
See also
LoadVars.addRequestHeader()
XML.appendChild()
Availability
Flash Player 5.
Usage
my_xml.appendChild(childNode)
Parameters
childNode
The child node to be added to the specified XML object’s child list.
Returns
Nothing.
Description
Method; appends the specified child node to the XML object’s child list. The appended child
node is placed in the tree structure once removed from its existing parent node, if any.
Example
The following example clones the last node from doc1 and appends it to doc2.
doc1 = new XML(src1);
doc2 = new XML();
node = doc1.lastChild.cloneNode(true);
doc2.appendChild(node);