Parsing RSS 1.0 with ColdFusion MX
April 09, 2004
Well thanks to Sean Corfield I understand why I was having issues with namespaces when trying to parse RSS 1.0 with XPath.
If you have a document with namespaces such as RSS 1.0, you need to fully qualify name spaces in your XPath queries, such as: /rdf:RDF/ - that makes sense, but what I didn't realize is that you still need to qualify the namespaces, when namespaces are used in the document for elements using the default namespace, such as item: /rdf:RDF/:item/.
Check out the ColdFusion RSS Feed Parser by Foundeo
Tweet
Permalink | Add Comment |
add to del.icio.us
| Tags: rss, cfml, xml, xpath, corfield, coldfusion, xmlsearch
add to del.icio.us
| Tags: rss, cfml, xml, xpath, corfield, coldfusion, xmlsearch
Related Entries
- RSS and XPath - April 8, 2004
- Top 10 Underrated Functions in ColdFusion - January 10, 2007
- Foundeo's 2007 End of the Year Sale - December 21, 2007
- XPath Tool - July 28, 2004
- Parsing RSS with CFMX - September 12, 2003
Trackbacks
Trackback Address: 121/07B6268BBCDF234ADDD465A1933F7883
Comments
On 10/03/2012 at 10:29:29 AM EDT Sem wrote:
1
, it doesn't mean that every little XML dunmoect needs to be namespaced, if it remains private enough.As for XPath, I consider the difficulties in the use namespaces with XPath to be a weakness in XPath, one that causes me a regular amount of pain. I don't consider it a weakness in the way XML does namespaces. XPath is a convenient nuisance at any time; it's text format is short and convenient, but the fact that it's text and not XML sometimes makes it inconvenient. Not having anywhere to put namespace declarations is one side effect of the textual format. Still, would it be *so* hard to provide an extra parameter somewhere to allow the namespaces to be specified?With XSLT, it becomes a nuisance that there isn't an easy way to pass the namespace prefix to URI mappings into a script. If you could, it would certainly make XSLT transformations more robust with respect to namespace URI changes.Cheers, Tony.
Post a Comment
Recent Entries
- Writing Secure CFML cfObjective 2013 Slides
- Upgrading to Java 7 on Linux
- J2EE Sessions in CF10 Uses Secure Cookies
- Learn about ColdFusion Security at cfObjective 2013
- Session Loss and Session Fixation in ColdFusion
- FuseGuard 2.3 Released
- CKEditor Spell Checker Plugin
- Adobe Says Go Ahead and Upgrade your ColdFusion JVM





