yes, found that in a google search and was worried about the "clunk" :)
I may use 2 XML files and search the uppper case one, find the id of the node and then return the real one from the non upper case version, a bit of a hack but could get me what I need. thanks for the ideas guys. Grant ----- Original Message ----- From: Tom Copeland [EMAIL PROTECTED] To: Open Source Flash Mailing List [email protected] Sent: 12/5/05 9:46 PM Subject: Re: [osflash] xfactor studio xpath ignore case function ? > On Mon, 2005-12-05 at 22:05 +0000, [EMAIL PROTECTED] wrote: > > I'm using the following xpath query to find all products who's name > > contains the word "spoon" > > > > XPath.selectNodes(myXML,"//products/product[contains(name,'Spoon')") > > > > is there a way to also ignore the case, or convert the document to upper > > case before searching ? > > > > I see that xpath is supposed to have a string function upper-case but I > > can't figure out how to incorporate it into my contains call. > > I think (somewhat klunky) way to do this is to use the translate > function: > > //products > /product[ > contains( > translate( > name, > 'abcdefghijklmnopqrstuvwxyz', > 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' > ), 'SPOON' > ) > ] > > At least, this works with the Jaxen XPath engine [1]. > > Yours, > > Tom > > [1] http://jaxen.org/ > > > > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
