1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

XML - ASP - UPS - Help

Discussion in 'C#' started by mopacfan, May 19, 2004.

  1. #1
    I'm just getting my feet wet with XML. I've been coding html and asp since '95. So any help that anyone can provide will be greatly appreciated. (I started reading the XML Developers Handbook and had to use toothpicks to keep my eyes open)

    So here goes, below you'll see some sample code of what UPS returns when I submit a tracking request:

    
    <TrackResponse>
        <Response>
            <TransactionReference>
                <CustomerContext>Mocap1</CustomerContext>
                <XpciVersion>1.0001</XpciVersion>
            </TransactionReference>
            <ResponseStatusCode>1</ResponseStatusCode>
            <ResponseStatusDescription>Success</ResponseStatusDescription>
        </Response>
        <Shipment>
            <Shipper>
                <ShipperNumber>669668</ShipperNumber>
                <Address>
                    <AddressLine1>111 INDUSTRIAL DR</AddressLine1>
                    <City>PARK HILLS</City>
                    <StateProvinceCode>MO</StateProvinceCode>
                    <PostalCode>63601   3170</PostalCode>
                    <CountryCode>US</CountryCode>
                </Address>
            </Shipper>
            <ShipTo>
                <Address>
                    <AddressLine1>JACK</AddressLine1>
                    <AddressLine2>2295 AUTOPLEX DRIVE</AddressLine2>
                    <City>BOSSIER CITY</City>
                    <StateProvinceCode>LA</StateProvinceCode>
                    <PostalCode>71111</PostalCode>
                    <CountryCode>US</CountryCode>
                </Address>
            </ShipTo>
            <Service>
                <Code>003</Code>
                <Description>GROUND</Description>
            </Service>
            <ReferenceNumber>
                <Code>01</Code>
                <Value>51038</Value>
            </ReferenceNumber>
            <ReferenceNumber>
                <Code>01</Code>
                <Value>F15085</Value>
            </ReferenceNumber>
            <ShipmentIdentificationNumber>1Z6696680305103812</ShipmentIdentificationNumber>
            <PickupDate>20040415</PickupDate>
            <Package>
                <TrackingNumber>1Z6696680305103812</TrackingNumber>
                <Activity>
                    <ActivityLocation>
                        <Address>
                            <City>BOSSIER CITY</City>
                            <StateProvinceCode>LA</StateProvinceCode>
                            <PostalCode>71111</PostalCode>
                            <CountryCode>US</CountryCode>
                        </Address>
                        <Code>M3</Code>
                        <Description>FRONT DESK</Description>
                        <SignedForByName>NORRIS</SignedForByName>
                    </ActivityLocation>
                    <Status>
                        <StatusType>
                            <Code>D</Code>
                            <Description>DELIVERED</Description>
                        </StatusType>
                        <StatusCode>
                            <Code>KB</Code>
                        </StatusCode>
                    </Status>
                    <Date>20040419</Date>
                    <Time>094600</Time>
                </Activity>
                <Activity>
                    <ActivityLocation>
                        <Address>
                            <City>SHREVEPORT</City>
                            <StateProvinceCode>LA</StateProvinceCode>
                            <CountryCode>US</CountryCode>
                        </Address>
                    </ActivityLocation>
                    <Status>
                        <StatusType>
                            <Code>I</Code>
                            <Description>OUT FOR DELIVERY</Description>
                        </StatusType>
                        <StatusCode>
                            <Code>DS</Code>
                        </StatusCode>
                    </Status>
                    <Date>20040419</Date>
                    <Time>070000</Time>
                </Activity>
                <Activity>
                    <ActivityLocation>
                        <Address>
                            <City>SHREVEPORT</City>
                            <StateProvinceCode>LA</StateProvinceCode>
                            <CountryCode>US</CountryCode>
                        </Address>
                    </ActivityLocation>
                    <Status>
                        <StatusType>
                            <Code>I</Code>
                            <Description>ARRIVAL SCAN</Description>
                        </StatusType>
                        <StatusCode>
                            <Code>AR</Code>
                        </StatusCode>
                    </Status>
                    <Date>20040419</Date>
                    <Time>060000</Time>
                </Activity>
                <Activity>
                    <ActivityLocation>
                        <Address>
                            <City>JACKSON</City>
                            <StateProvinceCode>MS</StateProvinceCode>
                            <CountryCode>US</CountryCode>
                        </Address>
                    </ActivityLocation>
                    <Status>
                        <StatusType>
                            <Code>I</Code>
                            <Description>DEPARTURE SCAN</Description>
                        </StatusType>
                        <StatusCode>
                            <Code>DP</Code>
                        </StatusCode>
                    </Status>
                    <Date>20040416</Date>
                    <Time>225500</Time>
                </Activity>
                <Activity>
                    <ActivityLocation>
                        <Address>
                            <City>JACKSON</City>
                            <StateProvinceCode>MS</StateProvinceCode>
                            <CountryCode>US</CountryCode>
                        </Address>
                    </ActivityLocation>
                    <Status>
                        <StatusType>
                            <Code>I</Code>
                            <Description>LOCATION SCAN</Description>
                        </StatusType>
                        <StatusCode>
                            <Code>LC</Code>
                        </StatusCode>
                    </Status>
                    <Date>20040416</Date>
                    <Time>133756</Time>
    
    Code (markup):
    ... you get the idea.

    So what I'm looking for is a way to itterate through the response and display the tracking history to the user. I halfway understand getElementsByTagName(), selectNodes(), etc. My problem is understanding how to get to the activity section and loop through the details in such a way as to present meaningful information to the visitor. Basically, how the heck do you get down to the ActivityLocaion and Status nodes and then regurgiate them?

    I hope I made sense with that. It all looks so deceptively simple, but everytime I think I understand how to reference those nodes, blam, I run into a brick wall.

    Thanks in advance,

    MN
     
    mopacfan, May 19, 2004 IP
  2. nlopes

    nlopes Guest

    Messages:
    103
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Why don't you convert yourself to PHP? :)
    With PHP 5, you can do waht you want in 5 minutes with the new module SimpleXML (as it says its very simple!!)
    Or you could you XPath and PHP...

    In ASP I can't help you....
     
    nlopes, May 20, 2004 IP
  3. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Have you tride using the nodelist feature?

    For example:

    Dim myXMLDoc As New DOMDocument
    Dim myNodeLst As MSXML.IXMLDOMNodeList
    
    Set myNodeLst = myXMLDoc.getElementsByTagName("Activity")...
    
    For i = 0 to myNodeLst.Count - 1
      ...Iterate...
    Next
    Code (markup):
    Hope this helps
     
    xml, May 21, 2004 IP
  4. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    PHP is still lightyears behind the Microsoft XML parser. MSXML is so easy to integrate and its features are complete.

    I use PHP only on the web front and I can tell you so far PHP and XML is a let down.

    SimpleXML as you say is simple. I'm looking more forward to libxml myself :).
     
    xml, May 21, 2004 IP
  5. nlopes

    nlopes Guest

    Messages:
    103
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I was refering to PHP 5!! It uses the suberb libxml. It's fast, powerfull and easy! ;)
     
    nlopes, May 21, 2004 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    The XML parser in PHP 4.x always seems to work great (and fast) for whatever I've used it for. Maybe I'm just missing something by not looking at PHP 5 yet. :)

    - Shawn
     
    digitalpoint, May 21, 2004 IP
  7. nlopes

    nlopes Guest

    Messages:
    103
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    In PHP we used the expat library and now we use libXML, which is much faster and powerfull.
    And the SimpleXML extension is definetly very powerfull and simple!
     
    nlopes, May 21, 2004 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    {shrug} Always was fast for me... I can parse a 2GB XML and output it to a CSV file in about 12 minutes.
     
    digitalpoint, May 21, 2004 IP
  9. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Once you get some use of libxml you'll understand why it surpasses Expat.

    2GB to CVS in 12 mins using Expat is pretty impressive tho, no doubt about that... What was your setup? Quad Xeon 3.2 Ghz's :eek:?
     
    xml, May 21, 2004 IP
  10. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #10
    That was on a dual 1Ghz G4 (Mac).
     
    digitalpoint, May 21, 2004 IP
  11. mcdar

    mcdar Peon

    Messages:
    1,831
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Here is asp code that will create a simple dropdown plus a list with your results from UPS.

    Just change/add nodes for the information you require.

    <%

    responsexml = xmlhttp.responseText
    Set mydoc=Server.CreateObject("Microsoft.xmlDOM")
    mydoc.loadxml(responsexml)
    'Create a select table from the response xml
    response.Write("<select name='shipping'>")
    'Create A Nodelist of All The RatedShipments
    Set NodeList = mydoc.documentElement.selectNodes("RatedShipment")
    For x = 0 To NodeList.length - 1
    'Service/Code
    'TotalCharges/MonetaryValue
    response.write("<option>")
    Response.Write NodeList.Item(x).selectSingleNode("Service/Code").Text & " - $" & NodeList.Item(x).selectSingleNode("TotalCharges/MonetaryValue").Text & " - " & NodeList.Item(x).selectSingleNode("GuaranteedDaysToDelivery").Text
    response.write("</option>")

    Next
    response.Write("</select>")

    %>

    Caryl
     
    mcdar, Jun 8, 2004 IP
  12. mcdar

    mcdar Peon

    Messages:
    1,831
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Actually, here is the entire ASP code for UPS Rates (request and response) if anyone is interested.

    <% Response.Buffer=True %>
    <%
    'dim all of our vars
    Dim mydoc, responsexml
    'you can build the query dynamically by using request.form or request.querystring, however you want to use it
    strXML = "<?xml version='1.0'?><AccessRequest xml:lang='en-US'><AccessLicenseNumber>FBA4C73476F23F62</AccessLicenseNumber><UserId>cmcdar</UserId><Password>biznes1</Password></AccessRequest><?xml version='1.0'?><RatingServiceSelectionRequest xml:lang='en-US'><Request><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><RequestAction>Rate</RequestAction><RequestOption>shop</RequestOption></Request><PickupType><Code>01</Code></PickupType><Shipment><Shipper><Address><PostalCode>30076</PostalCode></Address></Shipper><ShipTo><Address><PostalCode>30041</PostalCode></Address></ShipTo><Service><Code>11</Code></Service><Package><PackagingType><Code>02</Code><Description>Package</Description></PackagingType><Description>Rate Shopping</Description><PackageWeight><Weight>33</Weight></PackageWeight></Package><ShipmentServiceOptions/></Shipment></RatingServiceSelectionRequest>"
    'this will url encode your request
    'strXML = Server.UrlEncode(strXML)
    'here's where we send the stuff
    Dim xmlhttp
    Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
    xmlhttp.Open "POST","https://www.ups.com/ups.app/xml/Rate?",false
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.send strXML

    responsexml = xmlhttp.responseText
    Set mydoc=Server.CreateObject("Microsoft.xmlDOM")
    mydoc.loadxml(responsexml)
    'Create a select table from the response xml
    response.Write("<select name='shipping'>")
    'Create A Nodelist of All The RatedShipments
    Set NodeList = mydoc.documentElement.selectNodes("RatedShipment")
    For x = 0 To NodeList.length - 1
    'Service/Code
    'TotalCharges/MonetaryValue
    response.write("<option>")
    Response.Write NodeList.Item(x).selectSingleNode("Service/Code").Text & " - $" & NodeList.Item(x).selectSingleNode("TotalCharges/MonetaryValue").Text & " - " & NodeList.Item(x).selectSingleNode("GuaranteedDaysToDelivery").Text
    response.write("</option>")

    Next
    response.Write("</select>")


    %>
     
    mcdar, Jun 8, 2004 IP
  13. RoLYroLLs

    RoLYroLLs Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Hey mopacfan.

    I was looking online for a few sample codes for this same exact thing. I had trouble acutally connecting to the track application on ups, but I got that going and now the result I get is "The XML document is not well formed" I have used the sample provided by UPS and and here is how i do the xml doc. Maybe you could help me?

    
    	strXML = ""
    	strXML = strXML & "<?xml version=1.0?>"
    	strXML = strXML & "<AccessRequest xml:lang=en-US>"
    	strXML = strXML & "<AccessLicenseNumber>MYACCESSNUMBER</AccessLicenseNumber>"
    	strXML = strXML & "<Userid>MYUSERID</Userid>"
    	strXML = strXML & "<Password>MYPASSWORD</Password>"
    	strXML = strXML & "</AccessRequest>"
    	strXML = strXML & "<?xml version=1.0?>"
    	strXML = strXML & "<TrackRequest xml:lang=en-US>"
    	strXML = strXML & "<Request>"
    	strXML = strXML & "<TransactionReference>"
    	strXML = strXML & "<CustomerContext>sample</CustomerContext>"
    	strXML = strXML & "<XpciVersion>1.0001</XpciVersion>"
    	strXML = strXML & "</TransactionReference>"
    	strXML = strXML & "<RequestAction>Track</RequestAction>"
    	strXML = strXML & "</Request>"
    	strXML = strXML & "<TrackingNumber>1Z12345E1512345676</TrackingNumber>"
    	strXML = strXML & "</TrackRequest>"
    	
    	set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
    	objHttp.open "POST", "https://www.ups.com/ups.app/xml/Track", false
    	objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
    	objHttp.Send strXML
    
    Code (markup):
    Any ideas?

    Thanks!
     
    RoLYroLLs, Jun 13, 2004 IP
  14. jongalloway

    jongalloway Guest

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You need single quotes around your attributes, like en-US:

    strXML = strXML & "<?xml version='1.0'?> "
    strXML = strXML & "<TrackRequest xml:lang='en-US'> "
    strXML = strXML & " <Request> "
    strXML = strXML & " <TransactionReference> "
    strXML = strXML & " <CustomerContext>Example 1</CustomerContext> "
    strXML = strXML & " <XpciVersion>1.0001</XpciVersion> "
    strXML = strXML & " </TransactionReference> "
    strXML = strXML & " <RequestAction>Track</RequestAction> "
    strXML = strXML & " <RequestOption /> "
    strXML = strXML & " </Request> "
    strXML = strXML & " <TrackingNumber>1ZT9T0000000000000</TrackingNumber> "
    strXML = strXML & "</TrackRequest> "

    'this will url encode your request
    'strXML = Server.UrlEncode(strXML)
    'here's where we send the stuff
    Dim xmlhttp
    Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
    xmlhttp.Open "POST","https://www.ups.com/ups.app/xml/Track?",false
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.send strXML

    responsexml = xmlhttp.responseText

    response.contenttype = "text/xml"
    response.write responsexml
     
    jongalloway, Jun 27, 2004 IP
  15. ggriffit

    ggriffit Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Hello All,

    Looks like the discussion went into PHP stuff and he was asking about XML-ASP-UPS. I am also having the same issue and was wondering if a solution was found.

    The solutions shown are for Rates, I am looking for a way to display the tracking. Any examples for that?

    Thanks!
     
    ggriffit, Aug 17, 2004 IP
  16. mcdar

    mcdar Peon

    Messages:
    1,831
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    0
    #16
    ggriffit,

    I have given the actual asp/xml code for UPS rate retrieval 2 posts up!

    What exactly are you looking for?

    Caryl
     
    mcdar, Aug 17, 2004 IP
  17. ggriffit

    ggriffit Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Cayrl,

    I am trying to get Tracking results. I think the example code you displayed above will help me figure things out. At first I did not see the second page of results. If you have a quick sample of how you format the results form the tracking side of things that would be great.

    Thanks,
    Grant
     
    ggriffit, Aug 17, 2004 IP
  18. mcdar

    mcdar Peon

    Messages:
    1,831
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Grant,

    I have not used the code to retrieve Tracking from UPS. So it would take time to work that out.

    But, I just write the XML rate results to my database and have ASP display them from there.

    Caryl
     
    mcdar, Aug 17, 2004 IP
  19. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #19
    It looks like all these posts are off base. Rolyrolls and ggriffit, if I understand you correctly (since this is what I'm trying to figure out as well), the issue is the data returned from ups when a package is tracked. Not what the rate of shipment is.

    Here is the xml that is returned from ups when a request is sent:
    <?xml version=""1.0""?>
    <TrackResponse>
    	<Response>
    		<TransactionReference>
    			<CustomerContext>Acme</CustomerContext>
    			<XpciVersion>1.0001</XpciVersion>
    		</TransactionReference>
    		<ResponseStatusCode>1</ResponseStatusCode>
    		<ResponseStatusDescription>Success</ResponseStatusDescription>
    	</Response>
    	<Shipment>
    		<Shipper>
    			<ShipperNumber>124578</ShipperNumber>
    			<Address>
    				<AddressLine1>111 INDUSTRIAL DR</AddressLine1>
    				<City>Allentown</City>
    				<StateProvinceCode>MO</StateProvinceCode>
    				<PostalCode>52487  3170</PostalCode>
    				<CountryCode>US</CountryCode>
    			</Address>
    		</Shipper>
    		<ShipTo>
    			<Address>
    				<AddressLine1>JACK</AddressLine1>
    				<AddressLine2>2295 AUTOPLEX DRIVE</AddressLine2>
    				<City>BOSSIER CITY</City>
    				<StateProvinceCode>LA</StateProvinceCode>
    				<PostalCode>71111</PostalCode>
    				<CountryCode>US</CountryCode>
    			</Address>
    		</ShipTo>
    		<Service>
    			<Code>003</Code>
    			<Description>GROUND</Description>
    		</Service>
    		<ReferenceNumber>
    			<Code>01</Code>
    			<Value>51038</Value>
    		</ReferenceNumber>
    		<ReferenceNumber>
    			<Code>01</Code>
    			<Value>F15085</Value>
    		</ReferenceNumber>
    		<ShipmentIdentificationNumber>1Z6696680305102154</ShipmentIdentificationNumber>
    		<PickupDate>20040415</PickupDate>
    		<Package>
    			<TrackingNumber>1Z6696680305102154</TrackingNumber>
    			<Activity>
    				<ActivityLocation>
    					<Address>
    						<City>BOSSIER CITY</City>
    						<StateProvinceCode>LA</StateProvinceCode>
    						<PostalCode>71111</PostalCode>
    						<CountryCode>US</CountryCode>
    					</Address>
    					<Code>M3</Code>
    					<Description>FRONT DESK</Description>
    					<SignedForByName>NORRIS</SignedForByName>
    				</ActivityLocation>
    				<Status>
    					<StatusType>
    						<Code>D</Code>
    						<Description>DELIVERED</Description>
    					</StatusType>
    					<StatusCode>
    						<Code>KB</Code>
    					</StatusCode>
    				</Status>
    				<Date>20040419</Date>
    				<Time>094600</Time>
    			</Activity>
    			<Activity>
    				<ActivityLocation>
    					<Address>
    						<City>SHREVEPORT</City>
    						<StateProvinceCode>LA</StateProvinceCode>
    						<CountryCode>US</CountryCode>
    					</Address>
    				</ActivityLocation>
    				<Status>
    					<StatusType>
    						<Code>I</Code>
    						<Description>OUT FOR DELIVERY</Description>
    					</StatusType>
    					<StatusCode>
    						<Code>DS</Code>
    					</StatusCode>
    				</Status>
    				<Date>20040419</Date>
    				<Time>070000</Time>
    			</Activity>
    			<Activity>
    				<ActivityLocation>
    					<Address>
    						<City>SHREVEPORT</City>
    						<StateProvinceCode>LA</StateProvinceCode>
    						<CountryCode>US</CountryCode>
    					</Address>
    				</ActivityLocation>
    				<Status>
    					<StatusType>
    						<Code>I</Code>
    						<Description>ARRIVAL SCAN</Description>
    					</StatusType>
    					<StatusCode>
    						<Code>AR</Code>
    					</StatusCode>
    				</Status>
    				<Date>20040419</Date>
    				<Time>060000</Time>
    			</Activity>
    			<Activity>
    				<ActivityLocation>
    					<Address>
    						<City>JACKSON</City>
    						<StateProvinceCode>MS</StateProvinceCode>
    						<CountryCode>US</CountryCode>
    					</Address>
    				</ActivityLocation>
    				<Status>
    					<StatusType>
    						<Code>I</Code>
    						<Description>DEPARTURE SCAN</Description>
    					</StatusType>
    					<StatusCode>
    						<Code>DP</Code>
    					</StatusCode>
    				</Status>
    				<Date>20040416</Date>
    				<Time>225500</Time>
    			</Activity>
    			<Activity>
    				<ActivityLocation>
    					<Address>
    						<City>JACKSON</City>
    						<StateProvinceCode>MS</StateProvinceCode>
    						<CountryCode>US</CountryCode>
    					</Address>
    				</ActivityLocation>
    				<Status>
    					<StatusType>
    						<Code>I</Code>
    						<Description>LOCATION SCAN</Description>
    					</StatusType>
    					<StatusCode>
    						<Code>LC</Code>
    					</StatusCode>
    				</Status>
    				<Date>20040416</Date>
    				<Time>133756</Time>
    			</Activity><Activity><ActivityLocation><Address><City>JACKSON</City><StateProvinceCode>MS</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>ARRIVAL SCAN</Description></StatusType><StatusCode><Code>AR</Code></StatusCode></Status><Date>20040416</Date><Time>113700</Time></Activity><Activity><ActivityLocation><Address><City>EARTH CITY</City><StateProvinceCode>MO</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>DEPARTURE SCAN</Description></StatusType><StatusCode><Code>DP</Code></StatusCode></Status><Date>20040416</Date><Time>021300</Time></Activity><Activity><ActivityLocation><Address><City>EARTH CITY</City><StateProvinceCode>MO</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>LOCATION SCAN</Description></StatusType><StatusCode><Code>LC</Code></StatusCode></Status><Date>20040415</Date><Time>230844</Time></Activity><Activity><ActivityLocation><Address><City>EARTH CITY</City><StateProvinceCode>MO</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>UNLOAD SCAN</Description></StatusType><StatusCode><Code>UL</Code></StatusCode></Status><Date>20040415</Date><Time>225800</Time></Activity><Activity><ActivityLocation><Address><City>EARTH CITY</City><StateProvinceCode>MO</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>ARRIVAL SCAN</Description></StatusType><StatusCode><Code>AR</Code></StatusCode></Status><Date>20040415</Date><Time>212600</Time></Activity><Activity><ActivityLocation><Address><City>FARMINGTON</City><StateProvinceCode>MO</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>DEPARTURE SCAN</Description></StatusType><StatusCode><Code>DP</Code></StatusCode></Status><Date>20040415</Date><Time>195000</Time></Activity><Activity><ActivityLocation><Address><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>M</Code><Description>BILLING INFORMATION RECEIVED</Description></StatusType><StatusCode><Code>MP</Code></StatusCode></Status><Date>20040415</Date><Time>190816</Time></Activity><Activity><ActivityLocation><Address><City>FARMINGTON</City><StateProvinceCode>MO</StateProvinceCode><CountryCode>US</CountryCode></Address></ActivityLocation><Status><StatusType><Code>I</Code><Description>ORIGIN SCAN</Description></StatusType><StatusCode><Code>OR</Code></StatusCode></Status><Date>20040415</Date><Time>184440</Time></Activity><PackageWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>7.00</Weight></PackageWeight><ReferenceNumber><Code>01</Code><Value>51038</Value></ReferenceNumber><ReferenceNumber><Code>01</Code><Value>51038-1 ACCT:F15085 PO# 70325</Value></ReferenceNumber><ReferenceNumber><Code>01</Code><Value>SHIPPED USING (FREIGHT PLUS)</Value></ReferenceNumber><ReferenceNumber><Code>01</Code><Value>SOFTWARE WWW.acme.COM</Value></ReferenceNumber>
    			
    		</Package>
    	</Shipment>
    </TrackResponse>
    Code (markup):
    If someone has any input into parsing this xml to get the tracking data out of it using ASP, that would be amazing and I would extremely grateful.
     
    mopacfan, Aug 17, 2004 IP
  20. mcdar

    mcdar Peon

    Messages:
    1,831
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    0
    #20
    I do not have time to totally figure this out but here is a sample of the response for UPS Rates that my above code then parses.

    You should be able to figure out the substitution for selecting nodes from here.
    Note: High Lighting below mine...
    Caryl
     
    mcdar, Aug 17, 2004 IP