> I need to parse and search xml data using coldfusion
> where tags are not always using the same case. (i.e.
> sometimes <improvements> and sometimes <Improvements>.
> While parsing is case-insensitive, xmlsearch is not.
> 
> Is there a search and replace that would convert all
> tags to lowercase letters?

Is there a reason for the inconsistency?  Is this data used by any other
applications?  If not, I would just run a search and replace on the file
outside of CF to make them all lowercase.  Then it becomes a non-issue for
CF and will save you a lot of time.

If you do have to keep the source data the same, but need to walk through
the tags within CF, you can output the XML object as a string into a
variable, S&R on that variable using CF's functions to get the tags to lower
case, and finally read it back into an XML object again.


-Justin Scott



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220954
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to