Link to home
Start Free TrialLog in
Avatar of globalterminal
globalterminal

asked on

Parse xml response from a webservice server-side.

i have a response in a variable from a webservice.  The ASP program runs on an IIS6.o webserver.  i need to parse this xml.  Can someone suggest a method? Also...there is a section in the XML called C!Data.  Can you explain what this section is?
<argo:gate-response xmlns:argo="http://www.navis.com/argo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.navis.com/argo GateWebserviceResponse.xsd">
<request-visit-details-response><truck-visit tv-key="10036084" gos-tv-key="1129" is-internal="false" next-stage-id="INSPECTION" status="OK" gate-id="GCT GATE" entered="2010-04-22T06:34:56">
<trucking-co id="ACME" /><driver card-id="755" driver-name="JOSEPH LONGO" /></truck-visit><truck-transactions>
<truck-transaction tran-key="10036088" tran-nbr="3058" tv-key="10036084" tran-type="DOM" category="STRGE" freight-kind="MTY" mission="I300" next-stage-id="INSPECTION" status="OK">
<container eqid="GATU4255755" type="4200" line-id="HLC" planned-slot="I300 " has-documents="false" operator-id="HLC"><routing /></container><documents><document doc-key="10036098" type="RM">
<content><![CDATA[<argo:Document xmlns:argo="http://www.navis.com/argo"><argo:docDescription><docName>RM</docName><docType>50329</docType></argo:docDescription><argo:docBody><argo:truckVisit><tvdtlsLicNbr>JL8</tvdtlsLicNbr>
<tvdtlsTruckId>JLONGO99</tvdtlsTruckId><tvdtlsDriverCardId>755</tvdtlsDriverCardId><tvdtlsDriverName>JOSEPH LONGO</tvdtlsDriverName><tvdtlsDriverLicenseNbr>NJ-JL1</tvdtlsDriverLicenseNbr>
<tvdtlsTrkCompany>ACME</tvdtlsTrkCompany><tvdtlsTrkCompanyName>ACME Trucking Company</tvdtlsTrkCompanyName><tvdtlsTrkId>JLONGO99</tvdtlsTrkId>
<tvdtlsBatNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tvdtlsTvKey>10036084</tvdtlsTvKey><tvdtlsGosTvKey>1129</tvdtlsGosTvKey>
<tvdtlsTrkStartTime>2010-04-22 06:34:56</tvdtlsTrkStartTime><tvdtlsEntryLane><laneId>LANE2</laneId></tvdtlsEntryLane>
<tvdtlsFlexString01 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tvdtlsFlexString02 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tvdtlsFlexString03 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><argo:tvdtlsRequiredStages><stageId>INGATE</stageId>
<stageOrder>1</stageOrder><stageDescription>INGATE</stageDescription></argo:tvdtlsRequiredStages></argo:truckVisit>
<argo:trkTransaction><argo:tranCtrOperator><bizuId>HLC</bizuId></argo:tranCtrOperator><argo:tranUnit><unitId>GATU4255755</unitId></argo:tranUnit>
<argo:tranFacility><fcyId>BAYONNE</fcyId></argo:tranFacility><argo:tranComplex><cpxId>GCTUSA</cpxId></argo:tranComplex>
<argo:tranOperator><oprId>GCT</oprId></argo:tranOperator><argo:tranCtrPosition><posLocId>Y-GLO-I300 </posLocId></argo:tranCtrPosition><tranNbr>3058</tranNbr>
<tranExchangeAreaId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranSubType>RM</tranSubType><tranTruckerFriendlySubType>DOM</tranTruckerFriendlySubType>
<tranStatus>OK</tranStatus><tranCreated>Apr 22, 2010 6:46 AM</tranCreated><tranCreator>jlongo</tranCreator><tranStageId>INGATE</tranStageId><tranNextStageId>INSPECTION</tranNextStageId>
<tranTrouble xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranTroubleStatus xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranCancelCode xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranNotes xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranTerminalId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranExportReleaseNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranImportReleaseNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranAppointmentNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranPinNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranTrkcId>ACME</tranTrkcId>
<tranCtrTruckPosition xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranCtrDoorDirection xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranCtrNbr>GATU4255755</tranCtrNbr><tranCtrOwnerId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranCtrFreightKind>MTY</tranCtrFreightKind>
<tranCtrTypeId>4200</tranCtrTypeId><tranCtrIsDamaged>false</tranCtrIsDamaged><tranCtrNbrAssigned xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranCtrTicketPosId>I300</tranCtrTicketPosId><tranCtrAccNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranCtrAccTypeId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranCtrAccFuelLevel xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranChsNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranChsOwnerId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranChsIsOwners>false</tranChsIsOwners><tranChsTypeId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranChsIsDamaged>false</tranChsIsDamaged>
<tranChsLicenseNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranChsNbrAssigned xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranChsAccNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranChsAccTypeId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranChsAccFuelLevel xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranTradeId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranOrigin xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranDestination xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranLineId>HLC</tranLineId><tranShipper xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranConsignee xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranScAgent xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranEqoEqIsoGroup>GP</tranEqoEqIsoGroup><tranEqoEqLength>NOM40</tranEqoEqLength>
<tranEqoEqHeight>NOM86</tranEqoEqHeight><tranEqoNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranMilitaryVNbr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranMilitaryTcn xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranMaterial>UNKNOWN</tranMaterial><tranShandId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranGroupId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranCommodityCode xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<tranCommodityDescription xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranVentRequired>null</tranVentRequired><tranVentSetting>null</tranVentSetting>
<tranIsHazard>false</tranIsHazard><tranIsPlacarded>false</tranIsPlacarded><tranIsPlacardedOk>false</tranIsPlacardedOk><tranIsOog>false</tranIsOog><tranIsXrayRequired>false</tranIsXrayRequired>
<tranCscDate xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><tranUnitCategory>UnitCategoryEnum[STRGE]</tranUnitCategory>
<argo:tranRequiredStages><stageId>INGATE</stageId><stageSequence>1</stageSequence><stageDescription>INGATE</stageDescription></argo:tranRequiredStages></argo:trkTransaction></argo:docBody>
<argo:Messages locale="en_US"/></argo:Document>]]></content></document></documents></truck-transaction></truck-transactions></request-visit-details-response></argo:gate-response>
<update-status> <document-update status="ACCEPTED" ></document-update >

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Om Prakash
Om Prakash
Flag of India 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
Avatar of globalterminal
globalterminal

ASKER

ok so using those 15seconds instructions i have this.

Set objXML = Server.CreateObject("Microsoft.XMLDOM")
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False

objXML.Load (wsResponse)
If objXML.parseError.errorCode <> 0 Then
End If
Set objLst = objXML.getElementsByTagName("*")
For i = 0 to (objLst.length - 1)
          If objLst.item(i).nodeName = "update-status" Then
                  StrDate = objLst.item(i).text
                    response.write "***" & StrDate & "*<br>"
            Exit For
         End If
 Next

i dont get the response.write results.
Can you see what i'm doing wrong?