ASP/XML question

Results 1 to 2 of 2

Thread: ASP/XML question

  1. #1
    Join Date
    Dec 1969

    Default ASP/XML question

    Hi all,<BR>I have a VB COM component that I am calling from my ASP page. This component has a function that returns an XML document as a string. In my ASP page, I am trying to save this XML string in a hidden control as such:<BR><BR>Dim objDB<BR>Dim sRtnXml<BR>Dim rsMyRec<BR>.<BR>.<BR>.<BR>set oDB = server.CreateObject("MY_Component.GetXml")<BR>sRtn Xml = objDB.Process(rsMyRec)<BR>.<BR>.<BR>&#060;input type="hidden" id="xmlDoc" value="&#060;%=sRtnXml%&#062;"&#062;<BR><BR>Since the XML document in sRtnXml has the processing header<BR>&#060;?xml version="1.0"?&#062;, the ASP page is confilicting with the extra double quotes in the processing header. Is there a way to work around this perhaps by applying escape characters. Any help is appreciated. Thanks.

  2. #2
    Join Date
    Dec 1969

    Default Try Server.HTMLEncode

    &#060;input type="hidden" id="xmlDoc" value="&#060;%=Server.HTMLEncode(sRtnXml)%&#062;"& #062;<BR><BR>Never tried it with XML, but it works with HTML.<BR><BR>Should work.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts