Posting xml data back extra html tags get inserted

Adadiaminna

New Member
I have a website that makes request to our page on \[code\]http://www.xyz.com/test.aspx\[/code\] and in return we have to post back the response. Following code is what is sending the response back. Problem is it sends the XML data back but with it also it sends the code of test.aspx I don't know how to remove that. \[code\]Random random = new Random();int randomNumber = random.Next(0, 10000000);attrval = randomNumber + "tty";strCXML = "<?xml version=" + "\"" + "1.0" + "\"" + " encoding=" + "\"" + " UTF-8" + "\"" + " ?>"; strCXML =strCXML+"<!DOCTYPE cXML SYSTEM " + "\"" + "http://xml.cxml.org/schemas/cXML/1.2.023/cXML.dtd" + "\"" + ">";strCXML = strCXML + " <cXML payloadID=" + "\"" + attrval + "\"" + " timestamp=" + "\"" + strTimeStamp + "\"" + ">";strCXML = strCXML + "<Response>";strCXML = strCXML + " <Status code=" + "\"" + 200 + "\"" + " text=" + "\"" + "success" + "\"" + ">" + "</Status>";strCXML = strCXML + " <PunchOutSetupResponse> ";strCXML = strCXML + " <StartPage>";strCXML = strCXML + " <URL>" + strMySiteURL + "</URL>";strCXML = strCXML + " </StartPage>";strCXML = strCXML + " </PunchOutSetupResponse>";strCXML = strCXML + " </Response>";strCXML = strCXML + "</cXML>";Response.Write(strCXML);\[/code\]This is working fine except that when it posts the data back it also is including the html of test.aspx page \[code\]!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body></body></html> Please contact support with the Error Reference Number: ANERR-10000000000000000057040121 for more details</Status> </Response></cXML>\[/code\]Any ideas how I post it back so it only posts back the XML data above.
 
Back
Top