I have to re-write my Rate parser since USPSD changed not just the rates but
the service names etc today.
So I do not get burned like this again I wanted to change the XPath I use
and only get back the rates my client wants anyway.
Since the send the service ID attribute anyway this should be easy but I get
the syntax right for Witango it works fine in my XML editor as an XPATH
query but not in Witango
The XML file is attached
Right at this point I would love to get just my client requested rates back
<@ASSIGN request$usps_result value="<@DOM value='@@fromUSPS'>">
I wanted to use syntax like this
<@ELEMENTVALUE object=request$usps_result XPath=//[EMAIL PROTECTED] or @ID=3]
type=array>
I want to use the XPATH in order to limit the @DOM Value so it only holds
the Service elements that I am interested in. Then I can just walk the path
and build my array.
The documentation is sparse on this.
I could use help.
Of course this all happened without warning this morning so we can't take
foreign orders till I get this fixed.
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
<IntlRateResponse>
<Package ID="0">
<Prohibitions>Arms, ammunition. Cigarette lighters using butane gas. Feeding bottles.
Funeral urns. Goods bearing false marks of French manufacture or origin. Imitation
pearls containing lead salts and any articles of jewelry made with pearls of this type.
Measuring instruments marked in units not complying with French law. Perishable
infectious biological substances except as noted in Restrictions below. Perishable
noninfectious biological substances except as noted under Restriction below. Radioactive
materials. Saccharine in tablets or packets. Live plants and animals. Arms and weapons.
Human remains.</Prohibitions>
<Restrictions>Bees, honey, and beeswax must be accompanied by a certificate of origin and
noninfection issued by a qualified official approved by the Government. Shipments of
honey not exceeding 2 kilograms do not require the certificate. Books in the French
language printed abroad must have the names of the publisher and printer shown as
prescribed by the French copyright laws. Canned vegetables, fish, plums, and nuts not
bearing an indication of the country of origin by stamping, in plain raised or sunken
letters at least 4 millimeters high, in the middle of the top or bottom and in a place
not bearing any inscription. Gold coins or other articles of gold require that the
addressee have a permit issued by the Bank of France (not required for gold-plated
articles or for ornaments or jewelry containing only small amounts of gold and weighing
500 grams or less). Medicines and medicinal products require an import license issued by
the Central Pharmaceutical Service of the Ministry of Health. Perishable biological
substances, infectious and noninfectious, are admitted when addressed to the following
laboratories: 1. Pasteur Institute 25 rue du docteur Roux 75724 Paris CEDEX 14 FRANCE 2.
Pasteur Institute 1 rue du Professeur Calmette 59019 Lille CEDEX BB 245 FRANCE 3.
Pasteur Institute 77 rue Pasteur 69365 Lyon CEDEX FRANCE Plants, seeds, bulbs must be
accompanied by plant health certificate. The importation of tobacco leaves and stems,
manufactured tobaccos, cigars, cigarettes, chewing and smoking tobacco is permitted only
on behalf of the State Monopoly, with the following exception: Manufactured tobaccos,
including cigars and cigarettes, may be sent to individuals in France for personal use
up to 10 kilograms (22 pounds) per person per year, subject to special customs
authorization.</Restrictions>
<Observations>1. An air parcel post item may be addressed to a street address or to a post
office box. A local telephone number for the addressee should be provided when the item
is addressed to a street address and must be provided when the item is addressed to a
post office box. 2. For air parcels, an invoice, in duplicate, is required for all
commercial shipments regardless of value and for all personal shipments valued at $300
or more. The invoices must be affixed to the outside of the parcel or may be enclosed in
PS Form 2976-E with the customs declaration. 3. It is recommended that all articles
bear, as part of the address, the name of the Province in which the office of
destination is located. 4. Printed matter of value should have Form 2976 affixed, and it
can be cleared more readily through French customs if an invoice is enclosed. 5. Parcel
post packages whose senders or addressees are designated by initials will not be
admitted. 6. Shipments must not be fastened by means of wire, but straps not having
sharp edges may be used, provided they are tightly fastened so that no sharp ends or
corners are exposed.</Observations>
<CustomsForms>Letter-post: PS Form 2976 or 2976-A (see 123.61) Parcel Post: PS Form 2976-A
inside 2976-E (envelope) (Customs Form Information --
http://ircalc.usps.gov/custforms.htm)</CustomsForms>
<ExpressMail>Country Code: FR Reciprocal Service Name: There is no reciprocal service.
Required Customs Form/Endorsement 1. Business correspondence, commercial papers and
documents. PS Form 2976, Customs - CN 22 (Old C 1) and Sender's Declaration (green
label). 2. Merchandise samples, gifts, computer data including computer cards, magnetic
tape, microfilm, and microfiche. PS Form 2976-A, Customs Declaration and Dispatch Note
CP 72, inside a PS Form 2976-E, Customs Declaration Envelope CP 91. 3. Merchandise and
all articles subject to customs duty. PS Form 2976-A, Customs Declaration and Dispatch
Note CP 72, inside a PS Form 2976-E, Customs Declaration Envelope CP 91. A commercial
invoice must be attached to the outside of all commercial shipments. Notes: 1. Arms,
weapons, and human remains are prohibited. 2. An invoice, in duplicate, is required for
all commercial shipments regardless of value and for all personal shipments valued at
$300 or more. The invoices must be either affixed to the outside of the parcel or
enclosed in PS Form 2976-E with the customs declaration. 3. Indicate precise description
of documents, gifts, merchandise samples, and merchandise. 4. For personal gifts,
merchandise samples, and merchandise, indicate the value of the contents expressed in
U.S. dollars or French francs. 5. Label gift packages clearly as GIFT or CADEAU and
merchandise samples as SAMPLES. 6. Coins; banknotes; currency notes (paper money);
securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver
(manufactured or not); precious stones; jewelry; and other valuable articles are
prohibited in EMS shipments to France (including Corsica and Monaco). 7. An Express Mail
shipment may be addressed to a street address or to a post office box. A local telephone
number for the addressee should be provided when the item is addressed to a street
address and must be provided when the item is addressed to a post office box. Reciprocal
Service Name: There is no reciprocal service. Country Code: FR Areas Served All
locations in France, Corsica, and Monaco are served.</ExpressMail>
<AreasServed>Please reference Express Mail for Areas Served.</AreasServed>
<Service ID="4">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>49</Postage>
<SvcCommitments>1 - 3 Days</SvcCommitments>
<SvcDescription>Global Express Guaranteed</SvcDescription>
<MaxDimensions>Max. length 46", width 35", height 46" and max. length plus girth 108"</MaxDimensions>
<MaxWeight>70</MaxWeight>
</Service>
<Service ID="6">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>49</Postage>
<SvcCommitments>1 - 3 Days</SvcCommitments>
<SvcDescription>Global Express Guaranteed Non-Document Rectangular</SvcDescription>
<MaxDimensions>Max. length 46", width 35", height 46" and max. length plus girth 108"</MaxDimensions>
<MaxWeight>70</MaxWeight>
</Service>
<Service ID="7">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>49</Postage>
<SvcCommitments>1 - 3 Days</SvcCommitments>
<SvcDescription>Global Express Guaranteed Non-Document Non-Rectangular</SvcDescription>
<MaxDimensions>Max. length 46", width 35", height 46" and max. length plus girth 108"</MaxDimensions>
<MaxWeight>70</MaxWeight>
</Service>
<Service ID="1">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>30.5</Postage>
<SvcCommitments>3 - 5 Days</SvcCommitments>
<SvcDescription>Express Mail International (EMS)</SvcDescription>
<MaxDimensions>Max. length 42", max. length plus girth 79"</MaxDimensions>
<MaxWeight>66</MaxWeight>
</Service>
<Service ID="10">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>25</Postage>
<SvcCommitments>3 - 5 Days</SvcCommitments>
<SvcDescription>Express Mail International (EMS) Flat Rate Envelope</SvcDescription>
<MaxDimensions>9 1/2" X 12 1/2"</MaxDimensions>
<MaxWeight>66</MaxWeight>
</Service>
<Service ID="2">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>20</Postage>
<SvcCommitments>6 - 10 Days</SvcCommitments>
<SvcDescription>Priority Mail International</SvcDescription>
<MaxDimensions>Max. length 42", Max length plus girth combined 79"</MaxDimensions>
<MaxWeight>66</MaxWeight>
</Service>
<Service ID="8">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>11</Postage>
<SvcCommitments>6 - 10 Days</SvcCommitments>
<SvcDescription>Priority Mail International Flat Rate Envelope</SvcDescription>
<MaxDimensions>USPS-supplied Priority Mail flat-rate envelope 9 1/2" x 12 1/2." Maximum
weight 4 pounds.</MaxDimensions>
<MaxWeight>4</MaxWeight>
</Service>
<Service ID="9">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>37</Postage>
<SvcCommitments>6 - 10 Days</SvcCommitments>
<SvcDescription>Priority Mail International Flat Rate Box</SvcDescription>
<MaxDimensions>USPS-supplied Priority Mail flat-rate box. Maximum weight 20 pounds.</MaxDimensions>
<MaxWeight>20</MaxWeight>
</Service>
<Service ID="3">
<Pounds>0</Pounds>
<Ounces>14</Ounces>
<MailType>Package</MailType>
<Country>FRANCE</Country>
<Postage>10.4</Postage>
<SvcCommitments>Varies</SvcCommitments>
<SvcDescription>First-Class Mail International</SvcDescription>
<MaxDimensions>Max. length 24", Max. length, height, depth combined 36"</MaxDimensions>
<MaxWeight>64</MaxWeight>
</Service>
</Package>
</IntlRateResponse>