Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

reading an XML file in classic ASP/vbscript

Posted on 2010-01-11
1
Medium Priority
?
418 Views
Last Modified: 2012-05-08
In my ASP page, I  have variable that has an XML response payload inside.  How would i best parse this field?  to get the node values from the string?  
it is IIS 6.0 so i have some options.  but the ASP is classic ASP and i dont have time rewrite the ASP applications.

when i do this:
 response.Write("FULL XML: " & wsResponse)

i get this:

FULL XML: 3Severe errors occurred, check message.No active truck visit found for Gate Visit Nbr 741.SEVERE<argo:gate-response xmlns:argo="http://www.test.com/argo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.test.com/argo GateWebserviceResponse.xsd"><submit-transaction-response /></argo:gate-response><update-status> <document-update status="ACCEPTED" ></document-update > <entity-updates amount-successful="0" amount-failed="1" amount-not-found="0"> <logical-entity-update logical-entity="n/a" id="unknown" status="FAILED" >No active truck visit found for Gate Visit Nbr 741.</logical-entity-update> </entity-updates> </update-status>


0
Comment
Question by:globalterminal
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 1000 total points
ID: 26293366
You will basically need to create a DOMDocument object, load your XML and then either iterate over the nodes, or use XPath to retrieve individual nodes.

Alternatively, if you are only displaying it, then you could just apply and XSL transform to render the data as HTML.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question