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</ stateOrPro vince>
<zipOrPostalCode>123456</z ipOrPostal Code>
<country>US</country>
</addressSetting>
<addressSetting value="Remote1">
<streetAddress>123
Remote Way</streetAddress>
<city>MyCity</city>
<stateOrProvince>MyState</ stateOrPro vince>
<zipOrPostalCode>78910</zi pOrPostalC ode>
<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.SelectSingl eNode("sta teOrProvin ce").text but nothing seems to work.
Any assistance is appreciated.
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</
<zipOrPostalCode>123456</z
<country>US</country>
</addressSetting>
<addressSetting value="Remote1">
<streetAddress>123
Remote Way</streetAddress>
<city>MyCity</city>
<stateOrProvince>MyState</
<zipOrPostalCode>78910</zi
<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.SelectSingl
Any assistance is appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.