hehe don’t ask me where that : came from. Just a typo I guess. Sorry about
that
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: Helmut Doll [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 13, 2005 8:00 PM
To: CF-Talk
Subject: Re: Changing tag case

That's the type of solution I had hoped for and it seems to work in  
my tests so far (the : seemed to cause a problem, but without it it  
worked well).

Thank you very much.

Helmut Doll.


On Oct 13, 2005, at 6:28 PM, Bobby Hartsfield wrote:

> It seems like xls would be able to fix that for you without having  
> to change
> anything but here is a regex just the same...
>
> Ill haven't tested this yet... but it looks right.
>
> rereplacenocase(str, "(<.*?>)", "\L\1:", "all")
>
> str = your xmlSTRING (not xmlparsed data)
>
> xmlparse it AFTER you run the rereplace
>
>
> ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -----Original Message-----
> From: Helmut Doll [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 13, 2005 4:00 PM
> To: CF-Talk
> Subject: Re: Changing tag case
>
> The data comes from different sources and is submitted to the CF app.
> I am currently doing a search and replace that changes individual
> tags when I notice a problem, but that is not scalable.
> I am looking for a (maybe regular expression) solution (it has to be
> in cf), that would find all xml tags in a file and make them lower  
> case.
>
> Thanks for the suggestion,
>
> Helmut Doll
> [EMAIL PROTECTED]
>
> On Oct 13, 2005, at 3:33 PM, Justin D. Scott wrote:
>
>
>>> 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
>>
>>
>>
>>
>>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220978
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