Pardeep,
The example code below will do what you need very quick and easy.

<cfscript>
  // input string
  in='<string xmlns="http://tempuri.org/";>892028</string>';

  // parse string
  out=rereplacenocase(in, '<string([^>]*)>([^<]*)</string>', '\2','one');
</cfscript>

HTH,

Joseph DeVore
VeloxWeb Technologies



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 12:06 PM
To: CF-Talk
Subject: Re: How to take only a CUSTID number from XML code


How would you take out only the customer ID number from the following XML
response from a CFHTTP post:

This is the response that comes from the server we do the CFHTTP post to.


<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/";>892028</string>


We need to take out only the '892028' number and insert it into our
database. Right now it tries to insert all the XML code. The customer ID is
always in the same place in the code as far as position in the code. Thanks
in advance for any help.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to