"Joe" <an*******@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.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