Re: Pass XML string to ASP Function Problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Peter Foti (peter_at_Idontwantnostinkingemailfromyou.com)
Date: 03/10/04


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



Relevant Pages

  • Re: searching what groups a user belong from AD but errorThe Kerberos subsystem encountered an error
    ... I was just about to write back Joe. ... private string BuildFilterOctetString ... Co-author of "The .NET Developer's Guide to Directory Services ... DirectoryEntry searchRoot = new DirectoryEntry( ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: LogonUser access denied
    ... Joe - really appreciate your efforts on this one, i will try the privilege ... private static extern int LogonUser(String lpszUsername, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: 32-bit programs on Windows x64
    ... tiny individual sequences. ... to compare its input string against every possible ... compare one string against one string, ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... machine has "parallelism" ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)
  • Re: passing a string to a dll
    ... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ...
    (microsoft.public.vc.mfc)