« Extending Google Maps With JavaScript | Main | Apple Updates iPods »
February 22, 2005
xmlSearch is Always Case Sensitive
The ColdFusion function xmlSearch is always case sensitive, it seems, even if you specified case insensitive in the xmlParse function to create the XML object in the first place. So if you're parsing an XML document that you don't have complete control over (like an RSS feed), be careful. If there's a chance the case could be different than what you're expecting, make sure you search for both upper and lower case.
Posted by cantrell at February 22, 2005 5:33 PM
Comments
Back in the CF5 days, I used to use Torchbox
http://www.torchbox.com/xml/toolkit.cfm
They have a tag for CFMX as well. Its been awhile since I visited them and the main page link is currently deactived for maintenance( (at the time of posting this comment), but the sub link (above) still works. What was great about their tag is they converted XML to a query object where you could use Query of Queries to peform SQL selects on, allowing you to use the UPPER Function.
Admittedly, XML can be complex, but their approach to the naming of children satisfied most requirements.
Posted by: Christopher Wigginton at February 22, 2005 6:11 PM
One thing we use at work is to do a StructGet() around the XML object. This allows us to case insensitive "searching" via the Structure functions and notation.
Posted by: Jeff Anderson at June 2, 2005 11:32 AM