Hi Claude,

firstly, what is the reason for wanting to do this? Are the dashes giving
you problems?

You do know you can work with them like;

xmlRoot[ "organisation-name" ].xmlText

Anyways, to answer your question, you could do
myXMLString = toString( yourXML );
myNewXMLString = reReplaceNoCase( myXMLString, "(<[^-]+)-", "\1_", "all" );

I think thats it, I'm sure you get the idea if its not ;-)

*** { . } { . } ****
*http://www.clickfind.com.au* <http://www.clickfind.com.au/>
The new Australian search engine for businesses, products and services


 On 5/27/07, claude raiola <[EMAIL PROTECTED]> wrote:
>
>  I have xml data responses being returned from my requests sent to a third
> party organisation where their responses have xml nodes with names
> containing '-'
>
> eg <organisation-name>Sony</organisation-name>
>
> How can I use a replace function to pass though the xml data and replace
> the '-' with '_' however I only want the replace to apply inside the xml
> open and close nodes and not applied data being passed relating to the each
> node, element
>
> the xml response received is stored in a coulm within the database which I
> then call in order to process to display results in a html format
>
>
> <cfxml variable="XmlObj">
>                     <organisation-name>TRAINS 4 U</organisation-name>
>                     <organisation-type code="P/L"/>
>                     <organisation-number>000735106</organisation-number>
>
>                       <street-name>LOCOMOTIVE</street-name>
> </cfxml>
>
> To be
>
> <cfxml variable="XmlObj">
>
>                     <organisation_name>TRAINS 4 U</organisation_name>
>                     <organisation-type code="P/L"/>
>                     <organisation_number>000735106</organisation_number>
>
>                      <street_name>LOCOMOTIVE</street_name>
>
> </cfxml>
>
>
>
> Kind Regards
>
> Claude Raiola
> B.Econ(Acc.); B.Hotel Mngt.
> Mobile: 0414 228 948
> Phone: 07 5527 1990
> Fax: 07 3319 6444
>
> Websites:
> www.WebsiteSolutions.com.au <http://www.websitesolutions.com.au/>
> www.AustralianAccommodation.com <http://www.australianaccommodation.com/>
> www.AccommodationNewZealand.com <http://www.accommodationnewzealand.com/>
> www.HospitalityPurchasing.net <http://www.hospitalitypurchasing.net/>
> www.Samaris.net <http://www.samaris.net/>
>
>
> >
>
>



-- 
*** { . } { . } ****
http://www.clickfind.com.au
The new Australian search engine for businesses, products and services

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to