Func getCityState($zip) $feed = "http://production.shippingapis.com/ShippingAPI.dlll?API=CityStateLookup&XML=%3CCityStateLookupRequest%20USERID=%22" & $uspsID & "%22%3E%3CZipCode%20ID=%20%220%22%3E%3CZip5%3E" & $zip &"%3C/Zip5%3E%3C/ZipCode%3E%3C/CityStateLookupRequest%3E" $oOXml = _XmlFileLoad($feed) $ixml2 = $oOXml.documentElement $city = $ixml2.getElementsByTagName("City") $city = $city(0).text $state = $ixml2.getElementsByTagName('State') $state = $state(0).text Local $cs[2] $cs[0] = $city $cs[1] = $state Return $cs EndFunc Func deb($msg) MsgBox(4096, "", $msg) EndFunc Func getNames() $xmlatt = InetRead("http://www.SOMETHINGVALID/xml/newvendorportal.php",1) $feed = "newvendorportal.xml" If $xmlatt <> "" Then $xmlatt = BinaryToString($xmlatt) $fo = FileOpen($feed,2) If $fo <> -1 Then FileWrite($fo,$xmlatt) FileClose($fo) EndIf EndIf $oOXml = _XmlFileLoad($feed) $oXMLRoot = $oOXml.documentElement $num = $oXMLRoot.getElementsByTagName("num") $num = $num(0).text Local $enames[$num] $objElement = $oXMLRoot.getElementsByTagName("name") ;If IsObj($objElement) Then ConsoleWrite($objElement(0).childNodes(0).nodeValue &@crlf) $i=0 For $oXmlNode In $objElement $enames[$i]=$oXmlNode.text $i=$i+1 ;ConsoleWrite($oXmlNode.nodename & " - " & $oXmlNode.text & @CRLF) Next Return $enames EndFunc ;==>getNames Func _XmlFileLoad($strXmlFile) $strFile = $strXmlFile ;if not isobj($oXml) then $oXml = ObjCreate("Msxml2.DOMDocument.3.0") $oXml.async = 0 $oXml.load($strFile) If $oXml.parseError.errorCode <> 0 Then MsgBox(4096, "Error", "Error opening specified file: " & $strFile & @CRLF & $oXml.parseError.reason) SetError($oXml.parseError.errorCode) Return 0 EndIf Return $oXml EndFunc ;==>_XmlFileLoad