“Be inspired, enjoy your work, keep learning and never forget to play.” — gskinner

Get the name of all Xml nodes and Attributes

Posted: March 13th, 2008 | Author: Ivan Valadares | Filed under: Actionscript3, Code | 13 Comments »

How many times do we have an XML that comes from a webservice or from a source 
that we don't know. In these times getting that xml to a file can be cumbersome (imagine that you have authentication). So how about a nice little way to see all the node and attribute names in that xml, here's how:

Take this xml as an example:
file

For this file we'd get something like:
NODE NAME: Mouse
NODE NAME: ScreenSaver
ATTRIBUTE OF ScreenSaver NAME: desc
NODE CHILD OF ScreenSaver NAME: Active
ATTRIBUTE OF Active NAME: desc
NODE CHILD OF ScreenSaver NAME: File
ATTRIBUTE OF File NAME: desc
NODE CHILD OF ScreenSaver NAME: Time
ATTRIBUTE OF Time NAME: desc
ATTRIBUTE OF Time NAME: min
ATTRIBUTE OF Time NAME: max
ATTRIBUTE OF Time NAME: unit

Hope this helps you out.


13 Comments on “Get the name of all Xml nodes and Attributes”

  1. 1 Proxies said at 9:23 pm on January 16th, 2009:

    Excellent article , i just share it with my friend of Italy. I Stumble UP your blog post , you will notice an increase of traffic within 24 hours for targeted people. Cheers , Jimmy – Chicago City

  2. 2 Chintamani said at 4:13 am on January 21st, 2009:

    Its a good comment. Appreciated.

  3. 3 Google pagerank said at 2:49 pm on January 29th, 2009:

    Nice post and clear and concise. Can you expand on the main point please. Also do you have a newsletter? Thanks again

  4. 4 Jeffrey C. Rambach said at 4:10 am on February 4th, 2009:

    My name is Jeffrey C. Rambach and I read your blog and find in very interesting. This post seems to rank good on search engines. How did you do that?

  5. 5 USB Turntable said at 5:28 am on February 5th, 2009:

    Did anyone hear about Obama capping pay at $500K for CEO’s of bailed out companies? They act like that’s not a lot of money..

  6. 6 Erna Dian said at 9:33 am on February 13th, 2009:

    Kenapa ramai isteri tak puas dan kemudian curang dengan suami masing-masing?

  7. 7 Domain Business said at 11:20 am on February 25th, 2009:

    Hey…, This is not my first time i come to your blog but i think this is the first time i commenting in, after i see and read your blog post you have a great blog and nice article, i hope you always write usefull information, thanks for sharing !

  8. 8 Ribnot said at 8:09 am on March 13th, 2009:

    Very interesting topic. i will subscribe rss feed now. i like it very much.

  9. 9 Natasha Ford said at 3:16 pm on April 13th, 2009:

    Nice blog! I found this information very interesting. Thank You

  10. 10 Sekhar Burra said at 2:17 am on April 20th, 2009:

    This is awesome. Keep up the good work. Look forward to reading more from you in the future.

  11. 11 БECCTЫДHИK said at 10:11 pm on April 23rd, 2009:

    Очень даже круто. Особенно третье.

  12. 12 Natasha Ford said at 7:46 pm on April 29th, 2009:

    Nice work! very nice blog, keep up the good work. Anna

  13. 13 Pet Snakes said at 2:37 pm on May 27th, 2009:

    Very interesting post, I love finding a good quality blog thats not full of rubbish. I would love to do a link exchange.


Leave a Reply