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 <[email protected]> Authored: Mon Apr 11 13:13:36 2016 +0300 Committer: Harbs <[email protected]> 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; } /**
