function Tverpipxinfo.postXml(const xmlstr, url: WideString): WideString;
var
idHttp:TIdHTTP;
sends:tstrings;
IdEncoderMIME1:TIdEncoderMIME;
begin
result:='';
try
idHttp:= TIdHTTP.Create(nil);
idHttp.Request.ContentType := 'application/x-www-form-urlencoded';
IdEncoderMIME1:=TIdEncoderMIME.Create(nil);
sends:=tstringlist.Create;
sends.Add('xmlstr='+IdEncoderMIME1.Encode(xmlstr));
result:=idhttp.Post(url,sends);
except
on E:Exception do
begin
result:=e.Message;
end;
end;
idHttp.Free;
IdEncoderMIME1.Free;
sends.Free;
end;
var
idHttp:TIdHTTP;
sends:tstrings;
IdEncoderMIME1:TIdEncoderMIME;
begin
result:='';
try
idHttp:= TIdHTTP.Create(nil);
idHttp.Request.ContentType := 'application/x-www-form-urlencoded';
IdEncoderMIME1:=TIdEncoderMIME.Create(nil);
sends:=tstringlist.Create;
sends.Add('xmlstr='+IdEncoderMIME1.Encode(xmlstr));
result:=idhttp.Post(url,sends);
except
on E:Exception do
begin
result:=e.Message;
end;
end;
idHttp.Free;
IdEncoderMIME1.Free;
sends.Free;
end;
<%@ Language=VBScript %>
<%'On Error Resume Next
xmlstr=Request.form("xmlstr")
set xmlobj=server.CreateObject("microsoft.xmldom")
xmlobj.loadXML xmlstr
Response.ContentType="text/xml"%>
<?xml version="1.0" encoding="big5"?>
<%
Response.Write xmlobj.xml
set xmlobj=nothing
%>
<%'On Error Resume Next
xmlstr=Request.form("xmlstr")
set xmlobj=server.CreateObject("microsoft.xmldom")
xmlobj.loadXML xmlstr
Response.ContentType="text/xml"%>
<?xml version="1.0" encoding="big5"?>
<%
Response.Write xmlobj.xml
set xmlobj=nothing
%>
private void Page_Load(object sender, System.EventArgs e)
{
string str = "";
string reqstr="";
try
{
XmlDocument doc = new XmlDocument();
//doc.Load(Request.InputStream);
reqstr=Request.Form["xmlstr"];
reqstr =Encoding.GetEncoding("big5").GetString(Convert.FromBase64String(reqstr));
doc.LoadXml(reqstr);
doc.Save("d:/test.xml");
Response.Write("How are you..");
}
catch(Exception e1)
{
str = e1.Message;
}
Response.Write("str ==" + str);
}
{
string str = "";
string reqstr="";
try
{
XmlDocument doc = new XmlDocument();
//doc.Load(Request.InputStream);
reqstr=Request.Form["xmlstr"];
reqstr =Encoding.GetEncoding("big5").GetString(Convert.FromBase64String(reqstr));
doc.LoadXml(reqstr);
doc.Save("d:/test.xml");
Response.Write("How are you..");
}
catch(Exception e1)
{
str = e1.Message;
}
Response.Write("str ==" + str);
}