public insertBefore(newChild:XMLNode, insertPoint:XMLNode) : Void
Inserts a newChild node into the XML object's child list, before the insertPoint node. If insertPoint is not a child of the XMLNode object, the insertion fails.
newChild:XMLNode - The XMLNode object to be inserted.
insertPoint:XMLNode - The XMLNode object that will follow the newChild node after the method is invoked.
The following inserts a new XML node between two existing nodes:
var my_xml:XML = new XML("<a>1</a>\n<c>3</c>");
var insertPoint:XMLNode = my_xml.lastChild;
var newNode:XML = new XML("<b>2</b>\n");
my_xml.insertBefore(newNode, insertPoint);
trace(my_xml);
hasXMLSocket (capabilities.hasXMLSocket property), cloneNode (XMLNode.cloneNode method)