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/04/12 07:47:29 UTC

git commit: [flex-asjs] [refs/heads/develop] - Fixed XML setAttribute()

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 495d01626 -> 70a4892d6


Fixed XML setAttribute()


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

Branch: refs/heads/develop
Commit: 70a4892d60204ffe15d89056ad01333f6ff62497
Parents: 495d016
Author: Harbs <ha...@in-tools.com>
Authored: Tue Apr 12 08:47:25 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Apr 12 08:47:25 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70a4892d/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 7d47fca..d3ab421 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -1762,7 +1762,21 @@ package
 			{
 				//it's a regular attribute string
 				//TODO use toXMLName or toAttributeName to convert attr and assing it
-
+				var qname:QName = toAttributeName(attr);
+				var attrXML:XML = new XML();
+				attrXML.setNodeKind("attribute");
+				attrXML.setName(toAttributeName(attr));
+				attrXML.setValue(value);
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(_attributes[i].name().equals(attrXML.name()))
+					{
+						_attributes[i].setValue(value);
+						return;
+					}
+					//addChild(_att)
+				}
+				addChild(attrXML);
 			}
 
 		}