XMLSearch help - xpath not working as expected

2009-10-26 Thread Sameer Gupta
Hello, I am developing using CF9. I am fetching RSS feed from twitter but XmlSearch is unable to return array of entry elements in the xml. Please look into the following code: I can't be using CFFEED tag, since this project has to work on a CF 7 server. cfset sourceUrl =

Re: XMLSearch help - xpath not working as expected

2009-10-26 Thread s. isaac dealey
entry is the wrong entity for an RSS feed. The entry you want is item so you'd want xmlSearch(feed,//item) hth -- s. isaac dealey :: AutLabs Creating meaningful employment for people with Autism http://www.autlabs.com ph: 817.385.0301 http://onTap.riaforge.org/blog

Re: XMLSearch help - xpath not working as expected

2009-10-26 Thread Dominic Watson
I think this will be to do with the default namespace in the xml document. A quick google should tell you all you need to know on that, but the upshot is that you will need to use a colon (e.g. a blank namespace) before entity names, i.e.: cfset items = XmlSearch(feed, '//:entry') / HTH

Re: XMLSearch help - xpath not working as expected

2009-10-26 Thread Sameer Gupta
Thanks for responding Isaac. I was using an Atom feed and therefore had to use entry instead of item. It worked following the other advice. Best Sam ~| Want to reach the ColdFusion community with something they want? Let them

Re: XMLSearch help - xpath not working as expected

2009-10-26 Thread Sameer Gupta
I think this will be to do with the default namespace in the xml document. A quick google should tell you all you need to know on that, but the upshot is that you will need to use a colon (e.g. a blank namespace) before entity names, i.e.: cfset items = XmlSearch(feed, '//:entry') / HTH

Re: XMLSearch help - xpath not working as expected

2009-10-26 Thread s. isaac dealey
Thanks for responding Isaac. I was using an Atom feed and therefore had to use entry instead of item. It worked following the other advice. Ahh, well I read RSS in your original message and had just gone and double-checked the RSS link on my own twitter profile. :) Glad you got it figured