RE: [Flashcoders] XML named node values

2006-06-19 Thread Merrill, Jason
AS3 will do this when it's available.  It's in the new ECMA specs.  

Besides Xpath, you can also download other third party classes other people 
have created which will convert your XML object to an Actionscript object you 
can traverse with dot syntax:

JimsName = myXMLdoc.people[2].name

Personally, right now I like Xpath.  

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ron Wheeler
Sent: Saturday, June 17, 2006 9:43 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] XML  named node values

If the chNames do not have any key or ids, with what are you trying to
stay in sych?

If you are trying to use the node value as a key, then that is what you
have to check.

This is an XML fact of life - nothing to do with Flash or Actionscript.

XPATH will simplify the problem of finding specific nodes but traversing
the tree will work pretty easily as well.


Ron



D_C wrote:
 hi list -

 Q on flash and XML.

 is there a way to read named values from XML without using attributes?

 eg using atrribute names, a flash XML object can read named values,
 like associative arrays.

 channel chName='stocks' /

 xmlData.attributes[chName]

 but what if i want to use text nodes, like

 channel
 chNamestocks/chName

 then it seems the only way to access the data is:

 xmlData.firstChild.nodeValue

 but then if i change the order of the nodes, the app loses sync with
 its data.

 are there some other methods to the XML object that I am missing? Or
 do i have to write functions to loop thru the whole tree and check
 against nodeName (eg with a search function)? I guess there are
 probably some XPath libraries out there, but this would seem a basic
 functionality...

 Thanks!

 /dc
 ___
 David DC Collier

 [EMAIL PROTECTED]
 skype: callto://d3ntaku
 http://www.pikkle.com
 +81 (0)80 6521 9559

 http://charajam.com 【★キャラ♪ジャム★】
 人気キャラとJ-POP最新ヒット曲を自分で組み合わせて
 待受Flashや着Flashを作っちゃおう!
 ___
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Re: [Flashcoders] XML named node values

2006-06-17 Thread Ron Wheeler
If the chNames do not have any key or ids, with what are you trying to
stay in sych?

If you are trying to use the node value as a key, then that is what you
have to check.

This is an XML fact of life - nothing to do with Flash or Actionscript.

XPATH will simplify the problem of finding specific nodes but traversing
the tree will work pretty easily as well.


Ron



D_C wrote:
 hi list -

 Q on flash and XML.

 is there a way to read named values from XML without using attributes?

 eg using atrribute names, a flash XML object can read named values,
 like associative arrays.

 channel chName='stocks' /

 xmlData.attributes[chName]

 but what if i want to use text nodes, like

 channel
 chNamestocks/chName

 then it seems the only way to access the data is:

 xmlData.firstChild.nodeValue

 but then if i change the order of the nodes, the app loses sync with
 its data.

 are there some other methods to the XML object that I am missing? Or
 do i have to write functions to loop thru the whole tree and check
 against nodeName (eg with a search function)? I guess there are
 probably some XPath libraries out there, but this would seem a basic
 functionality...

 Thanks!

 /dc
 ___
 David DC Collier

 [EMAIL PROTECTED]
 skype: callto://d3ntaku
 http://www.pikkle.com
 +81 (0)80 6521 9559

 http://charajam.com 【★キャラ♪ジャム★】
 人気キャラとJ-POP最新ヒット曲を自分で組み合わせて
 待受Flashや着Flashを作っちゃおう!
 ___
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com