XMLNode.prototype.getChildByTagName = function (name) {
for (child in this.childNodes) {
if (this.childNodes [child] .nodeName == name) return this.childNodes [child];
if (this.childNodes.length> 0) {
childResult = this.childNodes [child] .getChildByTagName (name);
if (childResult) return childResult;
}
}
return false;
}
trace (this.getChildByTagName ("buttn_play"). nodeName);
<? xml version = "1.0" encoding = "UTF-8"?>
<skin>
<lol>
<b_lol />
<buttn_play img = "img / play.png" hover = "img / play_hover.png" down = "img / play_down.png" />
<b_lol2 />
</ lol>
</ skin>
Source: https://habr.com/ru/post/5961/
All Articles