Код AS3:
package tests
{
//{ imports
import flash.display.Sprite;
//}
/**
* XMLAppendExample class.
* @author wvxvw
* @langVersion 3.0
* @playerVersion 10.1
*/
public class XMLAppendExample extends Sprite
{
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Creates new <code>XMLAppendExample</code>.
*/
public function XMLAppendExample()
{
super();
this.example();
}
//--------------------------------------------------------------------------
//
// Private methods
//
//--------------------------------------------------------------------------
private function example():void
{
var source:XML =
<svg version="1.1"
xmlns:ps="http://www.example.ru"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" width="1016.195px"
xml:space="preserve"
>
<path fill="#C4C4C4"
d="M313.098,99.213l-9.5-14l9.5-12.5l16.5,3.5l8,13.5l-17,9.5H313.098z"/>
</svg>;
source.* = <ps:GeoInfo xmlns:ps="http://www.example.ru">
<ps:Geo>
<ps:GeoItem Latitude={37.234087} Longitude={74.88986}/>
<ps:GeoItem Latitude={38.244042} Longitude={75.215684}/>
</ps:Geo>
</ps:GeoInfo> + source.*;
trace(source.toXMLString());
/*
<svg version="1.1" x="0px" y="0px" width="1016.195px" aaa:space="preserve" xmlns:ps="http://www.example.ru" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:aaa="http://www.w3.org/XML/1998/namespace">
<ps:GeoInfo>
<ps:Geo>
<ps:GeoItem Latitude="37.234087" Longitude="74.88986"/>
<ps:GeoItem Latitude="38.244042" Longitude="75.215684"/>
</ps:Geo>
</ps:GeoInfo>
<path fill="#C4C4C4" d="M313.098,99.213l-9.5-14l9.5-12.5l16.5,3.5l8,13.5l-17,9.5H313.098z"/>
</svg>*/
}
}
}