You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2016/08/23 21:58:35 UTC
git commit: [flex-asjs] [refs/heads/refactor-sprite] - Added missing
XML methods to XMLList
Repository: flex-asjs
Updated Branches:
refs/heads/refactor-sprite 8ebc9f5bc -> de0d9efe4
Added missing XML methods 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/de0d9efe
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/de0d9efe
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/de0d9efe
Branch: refs/heads/refactor-sprite
Commit: de0d9efe4214543787164367edac41bef2429663
Parents: 8ebc9f5
Author: Harbs <ha...@in-tools.com>
Authored: Wed Aug 24 00:58:29 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Aug 24 00:58:29 2016 +0300
----------------------------------------------------------------------
.../projects/XML/src/main/flex/XMLList.as | 68 ++++++++++++++++++++
1 file changed, 68 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0d9efe/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 a3e01e6..2855905 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -707,14 +707,80 @@ package
_xmlArray[i].setAttribute(attr,value);
}
+ public function insertChildAfter(child1:XML, child2:XML):XML
+ {
+ if(isSingle())
+ return _xmlArray[0].insertChildAfter(child1,child2);
+
+ return null;
+ }
+ public function insertChildBefore(child1:XML, child2:XML):XML
+ {
+ if(isSingle())
+ return _xmlArray[0].insertChildAfter(child1,child2);
+
+ return null;
+ }
+
+ public function namespace(prefix:String = null):*
+ {
+ if(isSingle())
+ return _xmlArray[0].namespace(prefix);
+ return null;
+ }
+ public function nodeKind():String
+ {
+ if(isSingle())
+ return _xmlArray[0].nodeKind();
+ return null;
+ }
+
+ public function removeNamespace(ns:*):XML
+ {
+ if(isSingle())
+ return _xmlArray[0].removeNamespace(ns);
+
+ return null;
+ }
+ public function replace(propertyName:Object, value:*):*
+ {
+ if(isSingle())
+ _xmlArray[0].replace(propertyName,value);
+ }
public function setChild(elementName:*, elements:Object):void
{
if(isSingle())
_xmlArray[0].setChild(elementName,elements);
}
+
+ public function setChildren(value:Object):XML
+ {
+ if(isSingle())
+ return _xmlArray[0].setChildren(value);
+
+ return null;
+ }
+
+ public function setLocalName(name:String):void
+ {
+ if(isSingle())
+ _xmlArray[0].setLocalName(name);
+ }
+ public function setName(name:String):void
+ {
+ if(isSingle())
+ _xmlArray[0].setName(name);
+ }
+
+ public function setNamespace(ns:Namespace):void
+ {
+ if(isSingle())
+ _xmlArray[0].setNamespace(ns);
+ }
+
/**
* Calls the text() method of each XML object and returns an XMLList object that contains the results.
*
@@ -854,10 +920,12 @@ package
{
return isSingle() ? _xmlArray[0].match(regexp) : null;
}
+/*
public function replace(regexp:*,withStr:*):String
{
return isSingle() ? _xmlArray[0].replace(regexp,withStr) : null;
}
+*/
public function search(regexp:*):Number
{
return isSingle() ? _xmlArray[0].search(regexp) : -1;