Parsing XML

I am developing an page that will collect an address and I would like to interface the USPS API to validate and reformate the address into a standard format.  I understand how to send the request via the API (using CFHTTP) but the response back is an XML response.  Here is a sample from the docs:
<?xml version="1.0"?>
<AddressValidateResponse><Address ID="1"><Address2>8 WILDWOOD DR</Address2>
<City>OLD LYME</City><State>CT</State>

How do I use CF to parse the response of XML?  Something simple (I HOPE)?

Also, is there a way to format XML as it is part or the form being sent to USPS.  Here is a sample request:
&XML=<AddressValidateRequest USERID="xxxxxxx"><Address ID="1"><Address1>
</Address1><Address2>8 Wildwood Drive</Address2><City>Old Lyme</City>

Thanks much in advance,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


 Use XMLparse() function to translate your XML into coldfusion structures

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hefterrAuthor Commented:
Hi gdemaria,
Thanks for the link.  A lot of info but I think I get it.  I haven't read throug it all.

Is there a way to format (opposite of parse) XML in this case of do you kust wing it as you know the tags and you are just placing variables inbetween (say using CFSAVCONTENT) to store it as a variable for the CFHTTP request.

Thanks again,

Similar to CFsaveContent is one just for XML...     <CFXML...>

<cfxml variable="MyXML">
    <cfoutput query="getProd">

The variable #MyXML# contains the XML you can now use..
hefterrAuthor Commented:
Thanks.  I'll have to read though the docs.   If they are not clear, Istart a new thread.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.