[Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Merrill, Jason
I'm asking this more out of curiosity than necessity, but the responses to this thread may help be avoid some headaches in the future. Been using xfactorstudio's Xpath classes with great success. However, I have found an odd thing - sometimes I have to cast what I thought was already string, to

RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Ralph Caraveo
Of Merrill, Jason Sent: Tuesday, December 20, 2005 9:21 AM To: Flashcoders mailing list Subject: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity I'm asking this more out of curiosity than necessity, but the responses to this thread may help be avoid some headaches in the future

Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Johan Lopes
Hi Jason, AFAIK, XPath.selectNodes() returns an Array. snippet from the docs /** 10 *selectNodes 11 * 12 *returns an array of nodes that match the given XPath 13 *expression using the the XMLNode (context) as the 14 *starting

Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Johan Lopes
Hmm. I now see what you mean. Maybe when you pass the value without casting it in the raw, some V2 components such as textArea etc, does an auto cast toString and therefore can deal with it but the MediaPlayback component is expecting a proper String and doesn't no what to grab it if you pass

RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Merrill, Jason
Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Ralph Caraveo Sent: Tuesday, December 20, 2005 1:00 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Out of curiosity, XPath

RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Merrill, Jason
, December 20, 2005 1:07 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity Hi Jason, AFAIK, XPath.selectNodes() returns an Array. snippet from the docs /** 10*selectNodes 11* 12*returns an array

RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Merrill, Jason
] On Behalf Of Ralph Caraveo Sent: Tuesday, December 20, 2005 1:00 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity Hi Jason, I've noticed simliar behavior but I think it's just in how you are using it. Generally I think Xpath will return

Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Mike Boutin
Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Johan Lopes Sent: Tuesday, December 20, 2005 1:07 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Out of curiosity, XPath and String Datatype

RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Doug Coning
, December 20, 2005 1:43 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity Maybe something like this may help? myText=XMLNode((XPath.selectNodes(myxml,myNodePath/mynode())[0])).node Va lue; Mike Boutin Merrill, Jason wrote

Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Mike Boutin
PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity That's using Flash's XML object with XPath to grab the node value - sure that works, and is good for nodes with CDATA, but overly complex - wrapping String() around it is easier

Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Morten Barklund Shockwaved
Mike Boutin wrote: Doesnt XPath.selectNodes(myxml, pathtocontent/text()); return the text value as well? The documentation says, that selectNodes *always* returns an array of XMLNode-objects - and it does. Always. The text()-syntax is only used to get the XMLNode representing a text node -

RE: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Merrill, Jason
Doesnt XPath.selectNodes(myxml, pathtocontent/text()); return the text value as well? Sure, but I don't think that works on attribute values (as in my example in my post). Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient