representation.xml
Код:
<?xml version="1.0" encoding="UTF-8" ?>
<representation>
<circle></circle>
<shape>
<point id="1"/>
<point id="2"/>
</shape>
<line></line>
</representation>
Код AS3:
private function representationFileLoaded(e:Event):void
{
this._representation = XML(this._urlLoader.data);
for each (var property:XML in this._representation)
{
trace(property);
}
}
->
Код AS3:
private function representationFileLoaded(e:Event):void
{
this._representation = XML(this._urlLoader.data);
trace(this._representation.representation);
}
->
Код AS3:
private function representationFileLoaded(e:Event):void
{
this._representation = XML(this._urlLoader.data);
trace(this._representation.circle);
}
->
Код AS3:
private function representationFileLoaded(e:Event):void
{
this._representation = XML(this._urlLoader.data);
trace(this._representation..representation);
}
->
Как мне обращаться к отдельным элементам иерархии, если не так?
Мне нужно пройтись по детям representation, чтобы создать экземпляры соответствующих классов.