Link to home
Start Free TrialLog in
Avatar of TexasPlowBoy
TexasPlowBoy

asked on

XML VBScript Assistance?

I am trying to extract data from a file I have in an address application.

The format of the file is:

<?xml version="1.0" encoding="iso-8859-1"?>
<FullAddressListing>
<addressSetting value="Corporate">
    <streetAddress>123
Corp Way</streetAddress>
    <city>MyCity</city>
    <stateOrProvince>MyState</stateOrProvince>
    <zipOrPostalCode>123456</zipOrPostalCode>
    <country>US</country>
  </addressSetting>
<addressSetting value="Remote1">
    <streetAddress>123
Remote Way</streetAddress>
    <city>MyCity</city>
    <stateOrProvince>MyState</stateOrProvince>
    <zipOrPostalCode>78910</zipOrPostalCode>
    <country>US</country>
  </addressSetting>
</FullAddressListing>

I am trying to use VBScript to Extract each value so I can import it into system for badging (not relevant).

I have tried different XML code snippets from this site and many others but can't get the script to dump out what I need.

I would like to set each value (address, State, Zip) as a unique varible (i.e. strState=oNode.SelectSingleNode("stateOrProvince").text but nothing seems to work.

Any assistance is appreciated.
ASKER CERTIFIED SOLUTION
Avatar of bondy666
bondy666
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.