Re: [Flashcoders] XPathAPI problems with wildcard searches

2006-08-04 Thread Keith Salisbury
! Thanks! Lori- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ryanm Sent: Tuesday, August 01, 2006 2:42 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] XPathAPI problems with wildcard searches r = XPathAPI.selectNodeList(x,/*/item

[Flashcoders] XPathAPI problems with wildcard searches

2006-08-01 Thread Lori Hutchek
I've been having problems with the xpathapi. I've been trying to do a wildcard search and according to all the documentation it's supported yet even simple straight forward search isn't working. Can anyone help? Example : code import mx.xpath.XPathAPI; x = new XML(test thing='boo'items

Re: [Flashcoders] XPathAPI problems with wildcard searches

2006-08-01 Thread ryanm
r = XPathAPI.selectNodeList(x,/*/item); The problem is that / and * are both node operators and math operators, so your statement is ambiguous. The obvious answer, based on your example XML, is to use ./items/item, but I don't know if your real XML is more complex or not. If it is, you

RE: [Flashcoders] XPathAPI problems with wildcard searches

2006-08-01 Thread Lori Hutchek
- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ryanm Sent: Tuesday, August 01, 2006 2:42 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] XPathAPI problems with wildcard searches r = XPathAPI.selectNodeList(x,/*/item); The problem

RE: [Flashcoders] XPathAPI problems with wildcard searches

2006-08-01 Thread Dave Watts
x = new XML(test thing='boo'items name='blah'item foo='bar'/item foo='blah'//items/test); r = XPathAPI.selectNodeList(x,/*/item); If I understand correctly, that search would not find anything, because item is not a child of test, but rather of items. If I'm reading your XPath expression

Re: [Flashcoders] XPathAPI problems with wildcard searches

2006-08-01 Thread ryanm
The reason I am trying to do the wildcard search is because I have nodes of the same name at different levels and I need them all. So giving a specific path wouldn't give me all of the nodes I need. That's not what your select says, the * wildcard only selectes children. /*/item = select