Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Output XML in browser

How would I output the variable below so I can see it as XML format in a browser?

I know I'm probably declaring the variable incorrectly
Dim _wXML As String
        _wXML = "<requestEnvelope>"
        _wXML &= "<requestHeader>"
        _wXML &= "<controlData>"
        _wXML &= "<clientName>XMLBusinessPartnerChannel</clientName>"
        _wXML &= "<userID>xmlweeksonly</userID>"
        _wXML &= "<password>xmlweeksonly</password>"
        _wXML &= "</controlData>"
        _wXML &= "<processData>"
        _wXML &= "<operationName>quickSearch</operationName>"
        _wXML &= "</processData>"
        _wXML &= "</requestHeader>"
        _wXML &= "<SearchRequest>"
        _wXML &= "<startDate>" & Format(startDate.SelectedDate, "MM/dd/yyyy").ToString & "</startDate>"
        _wXML &= "<endDate>" & Format(endDate.SelectedDate, "MM/dd/yyyy").ToString & "</endDate>"
        _wXML &= "<lengthOfStay>" & Trim(lengthOfStay.Text).ToString & "</lengthOfStay>"
        _wXML &= "<minUnitSize>" & Trim(minUnitSize.SelectedValue).ToString & "</minUnitSize>"
        _wXML &= "<regionCode>" & Trim(regionCode.Text).ToString & "</regionCode>"
        _wXML &= "</SearchRequest>"
        _wXML &= "</requestEnvelope>"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of nmarun
nmarun
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
Set the content-type in the response header to "text/xml"
Response.ContentType = "text/xml"

Open in new window