RE: [Flashcoders] XPath Query HELP!
Look at the class com.xfactorstudio.xml.xpath.types.Predicate line 266, add these traces: static function isEqualTo(val1, val2):Boolean{ trace(EQUALS::+val1+ , +val2) var values = Predicate.convertForComparison(val1, val2); for (var i in values){ trace(i+ : +values[i]); } return (values.val1 == values.val2); } You will see that the convertForComparison method is not working correctly for some reason. I don't have time to continue looking at this, I hope this gets you on the right path (har har). - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] XPath Query HELP!
I could not resist finding out what was wrong, here's the fix I came up with: Line 70 of com.xfactorstudio.xml.xpath.XPathUtils reads: for (var i=1 ; i=max ; i+=2) It should say i=max to accommodate 1 character text node values. Make that change and your query will work. - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:22 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! Look at the class com.xfactorstudio.xml.xpath.types.Predicate line 266, add these traces: static function isEqualTo(val1, val2):Boolean{ trace(EQUALS::+val1+ , +val2) var values = Predicate.convertForComparison(val1, val2); for (var i in values){ trace(i+ : +values[i]); } return (values.val1 == values.val2); } You will see that the convertForComparison method is not working correctly for some reason. I don't have time to continue looking at this, I hope this gets you on the right path (har har). - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] XPath Query HELP!
Oops, I meant to say: Line 70 of com.xfactorstudio.xml.xpath.XPathUtils reads: for (var i=1 ; imax ; i+=2) Note the less than - - - - - - - - - - - - Tim Beynart Athens, GA, USA 706.372.6994 - - - - - - - - - - - - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:41 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! I could not resist finding out what was wrong, here's the fix I came up with: It should say i=max to accommodate 1 character text node values. Make that change and your query will work. - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:22 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! Look at the class com.xfactorstudio.xml.xpath.types.Predicate line 266, add these traces: static function isEqualTo(val1, val2):Boolean{ trace(EQUALS::+val1+ , +val2) var values = Predicate.convertForComparison(val1, val2); for (var i in values){ trace(i+ : +values[i]); } return (values.val1 == values.val2); } You will see that the convertForComparison method is not working correctly for some reason. I don't have time to continue looking at this, I hope this gets you on the right path (har har). - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] XPath Query HELP!
Thank you very much. It works great... Doug Coning Software Developer FORUM Solutions, LLC -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:41 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! I could not resist finding out what was wrong, here's the fix I came up with: Line 70 of com.xfactorstudio.xml.xpath.XPathUtils reads: for (var i=1 ; i=max ; i+=2) It should say i=max to accommodate 1 character text node values. Make that change and your query will work. - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:22 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! Look at the class com.xfactorstudio.xml.xpath.types.Predicate line 266, add these traces: static function isEqualTo(val1, val2):Boolean{ trace(EQUALS::+val1+ , +val2) var values = Predicate.convertForComparison(val1, val2); for (var i in values){ trace(i+ : +values[i]); } return (values.val1 == values.val2); } You will see that the convertForComparison method is not working correctly for some reason. I don't have time to continue looking at this, I hope this gets you on the right path (har har). - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders This e-mail and any attachment(s) are intended for the specified recipient(s) only and are legally protected. If you have received this communication in error, please reply to sender's e-mail address with notification of the error and then destroy this message in all electronic and physical forms. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] XPath Query HELP!
Grant, Thank you very much for your help on this! Doug Coning Software Developer FORUM Solutions, LLC -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, November 01, 2005 2:18 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] XPath Query HELP! doug, do you have a better xml string, the one in your example is not valid xml and the flag you mentioned is not in it... grant - Original Message - From: Doug Coning [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: 11/1/05 2:11 PM Subject: [Flashcoders] XPath Query HELP! I am trying to run a query using xfactorstudio to find all the elements where a flag (bit) is set to '1' or true. However, I have been unsuccessful at getting the class to return any items when trying to query on the node. When I use the Xpath.selectNodes() function and pass the queries below, nothing works. Please help! Here's a sample: import com.xfactorstudio.xml.xpath.*; _global.XPath = XPath; var myStr:String = 0Item 119.951Plate 12.950Spoon4.95; var myXML:XML = new XML(myStr); trace(This works: \t\t + XPath.selectNodes(myXML,/products/product[name = 'Plate'])); trace(This doesn't work: + XPath.selectNodes(myXML,/products/product[flag = '1'])); trace(This doesn't work: + XPath.selectNodes(myXML,/products/product[flag = 1])); trace(This doesn't work: + XPath.selectNodes(myXML,/products/product[flag 0])); Thanks, Doug Coning Software Developer FORUM Solutions, LLC This e-mail and any attachment(s) are intended for the specified recipient(s) only and are legally protected. If you have received this communication in error, please reply to sender's e-mail address with notification of the error and then destroy this message in all electronic and physical forms. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders This e-mail and any attachment(s) are intended for the specified recipient(s) only and are legally protected. If you have received this communication in error, please reply to sender's e-mail address with notification of the error and then destroy this message in all electronic and physical forms. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] XPath Query HELP!
Great find Tim! You should send that to Neeld Tanksley [EMAIL PROTECTED] so that he can update the library, if you haven't already done so of course. ;-) On 11/2/05, Tim Beynart [EMAIL PROTECTED] wrote: Oops, I meant to say: Line 70 of com.xfactorstudio.xml.xpath.XPathUtils reads: for (var i=1 ; imax ; i+=2) Note the less than - - - - - - - - - - - - Tim Beynart Athens, GA, USA 706.372.6994 - - - - - - - - - - - - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:41 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! I could not resist finding out what was wrong, here's the fix I came up with: It should say i=max to accommodate 1 character text node values. Make that change and your query will work. - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart Sent: Wednesday, November 02, 2005 10:22 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XPath Query HELP! Look at the class com.xfactorstudio.xml.xpath.types.Predicate line 266, add these traces: static function isEqualTo(val1, val2):Boolean{ trace(EQUALS::+val1+ , +val2) var values = Predicate.convertForComparison(val1, val2); for (var i in values){ trace(i+ : +values[i]); } return (values.val1 == values.val2); } You will see that the convertForComparison method is not working correctly for some reason. I don't have time to continue looking at this, I hope this gets you on the right path (har har). - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] XPath Query HELP!
Thanks, I did sent him an email this morning. This was my first decent contribution after years of reading this list! - - - - - - - - - - - - Tim Beynart Athens, GA, USA - - - - - - - - - - - - -Original Message- Great find Tim! You should send that to Neeld Tanksley [EMAIL PROTECTED] so that he can update the library, if you haven't already done so of course. ;-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders