Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML - Implied Attribute Access Not Working In Royale #1205

Open
yishayw opened this issue Jul 12, 2022 · 0 comments
Open

XML - Implied Attribute Access Not Working In Royale #1205

yishayw opened this issue Jul 12, 2022 · 0 comments

Comments

@yishayw
Copy link
Contributor

yishayw commented Jul 12, 2022

In Flex

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                width="100%"
                height="100%"
                creationComplete="init()"
                xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
        <![CDATA[

            private function init():void
            {
                var myXml:XML = <node a="1"/>;
                myXml.attribute("a")[0] = "2";
                trace(myXml.toXMLString());
            }

        ]]>
    </fx:Script>
</mx:Application>

Traces

<node a="2"/>

But in Royale

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                width="100%"
                height="100%"
                creationComplete="init()"
                xmlns:js="library://ns.apache.org/royale/basic"
                xmlns:mx="library://ns.apache.org/royale/mx">
    <fx:Script>
        <![CDATA[

            private function init():void
            {
                var myXml:XML = <node a="1"/>;
                myXml.attribute("a")[0] = "2";
                trace(myXml.toXMLString());
            }

        ]]>
    </fx:Script>
</mx:Application>

Outputs

<node a="1"/>

@yishayw yishayw changed the title XML - Implied Attribute XML - Implied Attribute Access Not Working In Royale Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant