jonbeebe/Corona-XML-Module — pull request #1 by krstns (2011-12-21 23:57:46+00:00)
Title: new table structure for XmlParser

Hi,

I've mentioned some time ago on Corona SDK forums that it would be cool to allow a new way to access xml values. For example:

eight
twelve

xml.test["@one"] == "two"
xml.test.nine["@ten"] == "eleven"
xml.test.nine:value() == "twelve"
xml.test.three[1]["@four"][1] == "five"
xml.test.three[1]["@four"][2] == "six"
xml.test.three[2]:value() == "eight"

and still have the ability to use them as before

xml:children()[1]:name() == "test"
xml:properties()[1] == {name = "one", value = "two"}

I've created this pull request, but if you are not happy about my change I can create a new project on git hub and link to yours as the source of modification.

Thanks,
Krystian