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 =
"<products><product><flag>0</flag><name>Item
1</name><price>19.95</price></product><product><flag>1</flag><name>Plate
</name><price>12.95</price></product><product><flag>0</flag><name>Spoon<
/name><price>4.95</price></product></products>";
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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders