A
Allan
Hi All,
I am having a problem parsing an xml file I am getting from another server.
This is the portion of the xml I am getting I am interested in:
<DestinationAddress>
<City>Leawood</City>
<StateOrProvinceCode>KS</StateOrProvinceCode>
<PostalCode>66209</PostalCode>
<CountryCode>US</CountryCode>
</DestinationAddress>
I am trying to write the above result in an html page as follow:
Leawood, KS, 662009, US
However my code keeps producing the following omitting the commas:
, LeawoodKS662009US
This is my code (I am using jscript!!)
....
var objXMLDOM = Server.CreateObject("MSXML2.DOMDocument");
objXMLDOM.loadXML(objXMLHttp.responseText);
objXMLDOM.async = false;
var Address = objXMLDOM.getElementsByTagName("DestinationAddress");
var AddressText = "";
for (var i = 0; i < Address.length; i++)
{
AddressText = AddressText + ", " + Address.item(i).text }
Response.Write(AddressText);
I am having a problem parsing an xml file I am getting from another server.
This is the portion of the xml I am getting I am interested in:
<DestinationAddress>
<City>Leawood</City>
<StateOrProvinceCode>KS</StateOrProvinceCode>
<PostalCode>66209</PostalCode>
<CountryCode>US</CountryCode>
</DestinationAddress>
I am trying to write the above result in an html page as follow:
Leawood, KS, 662009, US
However my code keeps producing the following omitting the commas:
, LeawoodKS662009US
This is my code (I am using jscript!!)
....
var objXMLDOM = Server.CreateObject("MSXML2.DOMDocument");
objXMLDOM.loadXML(objXMLHttp.responseText);
objXMLDOM.async = false;
var Address = objXMLDOM.getElementsByTagName("DestinationAddress");
var AddressText = "";
for (var i = 0; i < Address.length; i++)
{
AddressText = AddressText + ", " + Address.item(i).text }
Response.Write(AddressText);