Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 16
Registered: ‎01-04-2011
My Device: Not Specified
My Carrier: Java Developer
Accepted Solution

XML Parser

Hi everybody,

Sorry for my english,and thanks to all that will read this message.
I'm new in playbook  developing,I have search in the playbook api but i didn't find the answer to my problem.
Is there some class for the xml parser?

 

Thank you for the future answer and for your help.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: XML Parser

XML is very easy.

 

var myxmlstring : String = '<root><tag>blue</tag><line color="green"></line></root>'; 


var xml : XML = new XML( myxmlstring );

 

From there, you can access tags like (from example above)

 

var value : String = xml.tag;

var color : String = xml.line@color;

 

etc.

 

There is good documentation on the XML class.

 

 

Contributor
Posts: 16
Registered: ‎01-04-2011
My Device: Not Specified
My Carrier: Java Developer

Re: XML Parser

Thanks,i think i have done a bad research.

thank you and I apologize for the time I made you waste.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: XML Parser

No waste.

 

More questions = better developers = better apps = more apps = more users = more market = more money for all.

Developer
Posts: 278
Registered: ‎10-27-2010
My Device: Playbook

Re: XML Parser

[ Edited ]

Howdy, Badge, your english is fine Smiley Happy

 

If you want to research the xml class a little more you can go here:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/XML.html

 

XML in actionscript 3 is simple due to dot notation, in fact easier than most other languages ( in my opinion ).

 

If you have any questions feel free to ask.

--------------
kdittyr

Accepted PlayBook Applications:
HDB Converter -- Utilities/Calculators
Highlighted
Contributor
Posts: 16
Registered: ‎01-04-2011
My Device: Not Specified
My Carrier: Java Developer

Re: XML Parser

Thanks very much kdttyr, this will help me a  lot.