G
Guest
I am looking for instructions on how to parse a XML response received from a
web service into variable components for storage in an access table. I have
tried the application.importxml method and it is not providing the results I
need. Is there a way to pull elements from a XML message and populate them
into a table or recordset?
In the example below, I am mainly interested in capturing the jurisdiction
level EffectiveRate and TotalTax.
Sample XML Response:
<Purchase purchaseClass="" >999GeoCodeContainer</Purchase>
<Quantity >200603.0</Quantity>
<ExtendedPrice >1000.0</ExtendedPrice>
<Taxes taxResult="TAXABLE" taxType="CONSUMERS_USE" maxTaxIndicator="false"
situs="D" taxRuleId="9967" ><Jurisdiction jurisdictionLevel="STATE"
jurisdictionId="19873" >MISSOURI</Jurisdiction>
<CalculatedTax >42.25</CalculatedTax>
<EffectiveRate >0.04225</EffectiveRate>
<Taxable >1000.0</Taxable>
</Taxes>
<Taxes taxResult="TAXABLE" taxType="CONSUMERS_USE" maxTaxIndicator="false"
situs="D" taxRuleId="34295" ><Jurisdiction jurisdictionLevel="COUNTY"
jurisdictionId="20883" >PLATTE</Jurisdiction>
<CalculatedTax >13.75</CalculatedTax>
<EffectiveRate >0.01375</EffectiveRate>
<Taxable >1000.0</Taxable>
</Taxes>
<Taxes taxResult="TAXABLE" taxType="CONSUMERS_USE" maxTaxIndicator="false"
situs="D" taxRuleId="36533" ><Jurisdiction jurisdictionLevel="CITY"
jurisdictionId="77468" >KANSAS CITY</Jurisdiction>
<CalculatedTax >23.75</CalculatedTax>
<EffectiveRate >0.02375</EffectiveRate>
<Taxable >1000.0</Taxable>
</Taxes>
<TotalTax >79.75</TotalTax>
</LineItem>
web service into variable components for storage in an access table. I have
tried the application.importxml method and it is not providing the results I
need. Is there a way to pull elements from a XML message and populate them
into a table or recordset?
In the example below, I am mainly interested in capturing the jurisdiction
level EffectiveRate and TotalTax.
Sample XML Response:
</Buyer></Destination>
<Purchase purchaseClass="" >999GeoCodeContainer</Purchase>
<Quantity >200603.0</Quantity>
<ExtendedPrice >1000.0</ExtendedPrice>
<Taxes taxResult="TAXABLE" taxType="CONSUMERS_USE" maxTaxIndicator="false"
situs="D" taxRuleId="9967" ><Jurisdiction jurisdictionLevel="STATE"
jurisdictionId="19873" >MISSOURI</Jurisdiction>
<CalculatedTax >42.25</CalculatedTax>
<EffectiveRate >0.04225</EffectiveRate>
<Taxable >1000.0</Taxable>
</Taxes>
<Taxes taxResult="TAXABLE" taxType="CONSUMERS_USE" maxTaxIndicator="false"
situs="D" taxRuleId="34295" ><Jurisdiction jurisdictionLevel="COUNTY"
jurisdictionId="20883" >PLATTE</Jurisdiction>
<CalculatedTax >13.75</CalculatedTax>
<EffectiveRate >0.01375</EffectiveRate>
<Taxable >1000.0</Taxable>
</Taxes>
<Taxes taxResult="TAXABLE" taxType="CONSUMERS_USE" maxTaxIndicator="false"
situs="D" taxRuleId="36533" ><Jurisdiction jurisdictionLevel="CITY"
jurisdictionId="77468" >KANSAS CITY</Jurisdiction>
<CalculatedTax >23.75</CalculatedTax>
<EffectiveRate >0.02375</EffectiveRate>
<Taxable >1000.0</Taxable>
</Taxes>
<TotalTax >79.75</TotalTax>
</LineItem>