setting an xml attribute, bad nodeType

40 views
Skip to first unread message

Andy Woods

unread,
Jul 13, 2015, 10:24:17 AM7/13/15
to haxe...@googlegroups.com
Hi all,
any tips on why I am getting the below error? I'm doing this within utest.
Thanks :)




var xml:Xml = Xml.parse("<xml a='a'/>");
xml.set("a", "b");
trace(xml);

results: SOME TESTS FAILURES (success: false)
script.Test_XML_Tools
  test_modifyAttrib: ERROR E
    bad nodeType
Called from Xml.set (C:\HaxeToolkit\haxe\std\flash\_std\Xml.hx line 226)

Andy Woods

unread,
Jul 13, 2015, 2:41:48 PM7/13/15
to haxe...@googlegroups.com
I thought there was a remote chance of a race condition, but removing all utest stuff, I get the same issue:

szczepan

unread,
Jul 13, 2015, 3:26:27 PM7/13/15
to haxe...@googlegroups.com
Isn't word 'xml' forbidden...? :-)
Message has been deleted

Andreas Mokros

unread,
Jul 13, 2015, 3:41:39 PM7/13/15
to haxe...@googlegroups.com
Hi.

On Mon, 13 Jul 2015 11:41:48 -0700 (PDT)
Andy Woods <andyt...@gmail.com> wrote:
> I thought there was a remote chance of a race condition, but removing
> all utest stuff, I get the same issue:
> http://try.haxe.org/#9Ea6D

You have to use xml.firstChild() here.
http://try.haxe.org/#2202b

--
Mockey

Andy....@xperiment.mobi

unread,
Jul 13, 2015, 3:53:03 PM7/13/15
to haxe...@googlegroups.com
thank you so much Andreas :)

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages