[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XML_Parse ended in error
First time post for me.
Every time I try to get USPS rates for APO zip code, Parser ends in
error.
I suspect, it has a single quotes in Restrictions field.
Below is a xml document I'm getting from usps:
<?xml version="1.0" ?>
[1]- <RateV2Response>
[2]- <Package ID="1">
<ZipOrigination>43000</ZipOrigination>
<ZipDestination>96555</ZipDestination>
<Pounds>3</Pounds>
<Ounces>0</Ounces>
<Size>REGULAR</Size>
<Machinable>TRUE</Machinable>
<Zone>8</Zone>
[3]- <Postage>
<MailService>Priority Mail</MailService>
<Rate>11.95</Rate>
</Postage>
[4]- <Postage>
<MailService>Priority Mail Flat-Rate Envelope</MailService>
<Rate>4.95</Rate>
</Postage>
[5]- <Postage>
<MailService>Priority Mail Small Flat-Rate Box</MailService>
<Rate>4.95</Rate>
</Postage>
[6]- <Postage>
<MailService>Priority Mail Regular/Medium Flat-Rate
Boxes</MailService>
<Rate>10.35</Rate>
</Postage>
[7]- <Postage>
<MailService>Priority Mail Large Flat-Rate Box</MailService>
<Rate>11.95</Rate>
</Postage>
[8]- <Postage>
<MailService>Parcel Post</MailService>
<Rate>9.92</Rate>
</Postage>
[9]- <Postage>
<MailService>Bound Printed Matter</MailService>
<Rate>3.75</Rate>
</Postage>
[10]- <Postage>
<MailService>Media Mail</MailService>
<Rate>3.16</Rate>
</Postage>
[11]- <Postage>
<MailService>Library Mail</MailService>
<Rate>3.00</Rate>
</Postage>
<Restrictions>A1. Mail addressed to 'Any Servicemember' or similar
wording such as 'Any Soldier, Sailor, Airman or Marine', 'Military
Mail', etc., is prohibited. Mail must be addressed to an individual or
job title, such as 'Commander', 'Commanding Officer', etc. B. Form
2976-A required for all mail weighing 16 ounces or more, with
exceptions noted below. In addition, mailers must properly complete
required customs documentation when mailing any potentially dutiable
mail addressed to an APO or FPO regardless of weight. The following
are exceptions to the requirement for customs documentation on
non-dutiable mail weighing 16 oz. or more: B. a. Known mailers (those
legally applying a permit imprint to a mailpiece) are exempt from
providing customs documentation on non-dutiable letters and printed
matter weighing 16 oz. or more. Mail with meter postage is not
considered to be from a known mailer. B. b. Federal, state, and local
government agencies are exempt from providing customs documentation,
except on mail to APOs/FPOs to which restriction B2 applies. B. c.
Prepaid mail from military contractors is exempt, providing mailpiece
is endorsed 'Contents for Official Use-Exempt from Customs
Requirement'. B1. Form 2976 or 2976-A required. Articles liable for
customs duty and/or purchase tax unless bona fide gifts intended for
use by military personnel or their dependents. When contents of a
parcel meet these requirements, mailer must endorse customs form,
'Certified to be a bona fide gift, personal effects, or items for
personal use of military personnel and dependents', under the heading,
Description of Contents. Exceptions: All exceptions listed in
restriction B are applicable to this restriction. F. Firearms of any
type are prohibited in all classes of mail. See definitions of
firearms in DMM 601.11.1.2c. This restriction does not apply to
firearms mailed to or by official U.S. government agencies. The
restriction for mail to this ZIP Code does not apply to firearms
mailed from this ZIP Code, provided ATF and USPS regulations are met.
Antique firearms are a separate category defined in DMM 601.11.2 and
ATF regulations; they do not require an ATF form. M. Fruits, animals,
and living plants are prohibited. V. Express Mail Military Service
(EMMS) not available.</Restrictions>
</Package>
</RateV2Response>
Any help greatly appreciated.
Thanks.
Vladimir
References
1. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
2. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
3. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
4. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
5. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
6. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
7. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
8. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
9. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
10. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
11. file://localhost/\\192.168.254.241\tmp\DSP_KWA1KENT2186120USPS.xml##
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------