Mr. David Summers
New member
unlike UPS, USPS has made it extremely difficult to read XML nodes:
here is the response xml i got from USPS....
<IntlRateResponse>
<Package ID="1st">
<Prohibitions> </Prohibitions>
<Restrictions></Restrictions>
<Observations></Observations>
<CustomsForms></CustomsForms>
<ExpressMail></ExpressMail>
<AreasServed></AreasServed>
<Service ID="4">
<Pounds> 1</Pounds>
<Ounces> 0</Ounces>
<MailType> Package</MailType>
<Country> JAPAN</Country>
<Postage> 64.00</Postage>
<SvcCommitments> 1 - 3 business days</SvcCommitments>
<SvcDescription> Global Express Guaranteed (GXG)</SvcDescription>
<MaxDimensions> Max. length 46", width 35", height 46" and max. length plus girth combined 108"</MaxDimensions>
<MaxWeight> 70</MaxWeight>
</Service>
</Package>
</IntlRateResponse>
----------------------------------------------
im tryin to write 64.00 to the webpage using this:
shippingCost = xmlDoc2.getElementsByTagName("Package[@ID='sendTo']")(0).childNodes(5).text
response.Write("[ "&shippingCost&" ]<br/>")
-----------------------------
and this is what the web page is telling me:
Microsoft VBScript runtime error '800a01a8'
Object required: '[object]'
its the same code that i have for UPS (which works) but for some strange reason it doesnt work for USPS? Any ideas,
Thanks,
here is the response xml i got from USPS....
<IntlRateResponse>
<Package ID="1st">
<Prohibitions> </Prohibitions>
<Restrictions></Restrictions>
<Observations></Observations>
<CustomsForms></CustomsForms>
<ExpressMail></ExpressMail>
<AreasServed></AreasServed>
<Service ID="4">
<Pounds> 1</Pounds>
<Ounces> 0</Ounces>
<MailType> Package</MailType>
<Country> JAPAN</Country>
<Postage> 64.00</Postage>
<SvcCommitments> 1 - 3 business days</SvcCommitments>
<SvcDescription> Global Express Guaranteed (GXG)</SvcDescription>
<MaxDimensions> Max. length 46", width 35", height 46" and max. length plus girth combined 108"</MaxDimensions>
<MaxWeight> 70</MaxWeight>
</Service>
</Package>
</IntlRateResponse>
----------------------------------------------
im tryin to write 64.00 to the webpage using this:
shippingCost = xmlDoc2.getElementsByTagName("Package[@ID='sendTo']")(0).childNodes(5).text
response.Write("[ "&shippingCost&" ]<br/>")
-----------------------------
and this is what the web page is telling me:
Microsoft VBScript runtime error '800a01a8'
Object required: '[object]'
its the same code that i have for UPS (which works) but for some strange reason it doesnt work for USPS? Any ideas,
Thanks,