Re: Pass XML string to ASP Function Problem
From: Peter Foti (peter_at_Idontwantnostinkingemailfromyou.com)
Date: 03/10/04
- Next message: Steven Burn: "Re: Is it possible to call another ASP page without opening it?"
- Previous message: Brad Simon: "Re: cookie test help needed"
- In reply to: Joe: "Pass XML string to ASP Function Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 10 Mar 2004 15:21:26 -0500
"Joe" <anonymous@discussions.microsoft.com> wrote in message
news:94E85192-347A-4AE7-AF27-2C9FF0743A8F@microsoft.com...
> This example outputs "XMLString = Data 1Data 2." When I pass XML string in
ASP, it
> will output the data only, without <data> anymore. Then how can I retrieve
the data one by one??
> Any ideas? thanks
>
> <%
> strRequestXML = "<data><field1>Data 1</field1><field2>Data
2</field2></data>"
> Call SaveData(strRequestXML)
> %><%
> Function SaveData(XMLString)
> Response.Write "XMLString = " & XMLString
> End Function
> %>
If you look at the source, you will see the entire string just as you wrote
it above. The problem is that these are being interpreted by your browser
because they look like HTML elements. If you want print out the string so
it's displayed in the browser, the do this:
Function SaveData(XMLString)
Response.Write "XMLString = " & Server.HTMLEncode(XMLString)
End Function
Regards,
Peter Foti
- Next message: Steven Burn: "Re: Is it possible to call another ASP page without opening it?"
- Previous message: Brad Simon: "Re: cookie test help needed"
- In reply to: Joe: "Pass XML string to ASP Function Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|