alexus
02-15-2008, 04:53 PM
Hey, I just got crazy trying to figure out how to parse the address data from USPS.com can some one help me out?
I have to XML possibilities:
Address Error
<?xml version="1.0" ?>
- <AddressValidateResponse>
- <Address ID="0">
- <Error>
<Number>-2147219040</Number>
<Source>SOLServerTest;SOLServerTest.CallAddressDll</Source>
<Description>This Information has not been included in this Test Server.</Description>
<HelpFile />
<HelpContext />
</Error>
</Address>
</AddressValidateResponse>
Address Is Correct
<?xml version="1.0" ?>
- <AddressValidateResponse>
- <Address ID="0">
<Address2>6406 IVY LN</Address2>
<City>GREENBELT</City>
<State>MD</State>
<Zip5>20770</Zip5>
<Zip4>1440</Zip4>
</Address>
</AddressValidateResponse>
What I need to extract is the error # and description (+ identify is the returned XML is errro file meaning it has ERROR key, otherwise if no ERROR key found just extract the address details.
I used to do RSS prsels but theu dont have tags like <address id="0"> (the once with spaces) so i can handle this onee :(
Please help me...
I have to XML possibilities:
Address Error
<?xml version="1.0" ?>
- <AddressValidateResponse>
- <Address ID="0">
- <Error>
<Number>-2147219040</Number>
<Source>SOLServerTest;SOLServerTest.CallAddressDll</Source>
<Description>This Information has not been included in this Test Server.</Description>
<HelpFile />
<HelpContext />
</Error>
</Address>
</AddressValidateResponse>
Address Is Correct
<?xml version="1.0" ?>
- <AddressValidateResponse>
- <Address ID="0">
<Address2>6406 IVY LN</Address2>
<City>GREENBELT</City>
<State>MD</State>
<Zip5>20770</Zip5>
<Zip4>1440</Zip4>
</Address>
</AddressValidateResponse>
What I need to extract is the error # and description (+ identify is the returned XML is errro file meaning it has ERROR key, otherwise if no ERROR key found just extract the address details.
I used to do RSS prsels but theu dont have tags like <address id="0"> (the once with spaces) so i can handle this onee :(
Please help me...