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:26:54 UTC

[31/50] git commit: [flex-asjs] [refs/heads/feature/maven-migration] - More XML issues

More XML issues


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/60670ecb
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/60670ecb
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/60670ecb

Branch: refs/heads/feature/maven-migration
Commit: 60670ecba5b25de896ecb7ac7373ff483811a196
Parents: 9d44fa9
Author: Harbs <ha...@in-tools.com>
Authored: Mon Apr 11 13:13:36 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Mon Apr 11 13:13:36 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 26 +++++++++++++++--------
 1 file changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/60670ecb/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 9b9c475..7d47fca 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -779,16 +779,16 @@ package
 					if(name.matches(_attributes[i].name()))
 						list.appendChild(_attributes[i]);
 				}
-				for(i=0;i<_children.length;i++)
+			}
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
 				{
-					if(_children[i].nodeKind() == "element")
-					{
-						if(name.matches(_children[i].name()))
-							list.appendChild(_children[i]);
+					if(name.matches(_children[i].name()))
+						list.appendChild(_children[i]);
 
-						list.concat(_children[i].descendants());
-					} 
-				}
+					list.concat(_children[i].descendants());
+				} 
 			}
 			return list;
 		}
@@ -1407,7 +1407,15 @@ package
 		COMPILE::JS
 		public function processingInstructions(name:String = "*"):XMLList
 		{
-			return null;
+			var i:int;
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "processing-instruction")
+					list.appendChild(_children[i]);
+			}
+			list.targetObject = this;
+			return list;
 		}
 		
 		/**