You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/04/18 15:27:02 UTC
[39/50] git commit: [flex-asjs] [refs/heads/feature/maven-migration]
- Added setAttribute() and setChild() to XMLList
Added setAttribute() and setChild() to XMLList
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9ce42e25
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9ce42e25
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9ce42e25
Branch: refs/heads/feature/maven-migration
Commit: 9ce42e25f38809d52c6c26691056983e36d5b447
Parents: 70a4892
Author: Harbs <ha...@in-tools.com>
Authored: Wed Apr 13 00:26:02 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Apr 13 00:26:02 2016 +0300
----------------------------------------------------------------------
frameworks/projects/XML/src/main/flex/XMLList.as | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9ce42e25/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index 1173512..8284bda 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -651,6 +651,24 @@ package
return _targetProperty;
}
+ COMPILE::JS
+ public function setAttribute(attr:*,value:String):void
+ {
+ var len:int = _xmlArray.length;
+ for (var i:int=0;i<len;i++)
+ _xmlArray[i].setAttribute(attr,value);
+
+ }
+
+
+ COMPILE::JS
+ public function setChild(elementName:*, elements:Object):void
+ {
+ var len:int = _xmlArray.length;
+ if(len == 0)
+ _xmlArray[0].setChild(elementName,elements);
+
+ }
/**
* Calls the text() method of each XML object and returns an XMLList object that contains the results.
*