asp修改xml的某个节点
strBody='<?xmlversion="1.0"encoding="utf-8"?>';strBody=strBody+'<soap:Envelopexmlns:x...
strBody='<?xml version="1.0" encoding="utf-8"?>';
strBody=strBody+'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
strBody=strBody+'<soap:Body>';
strBody=strBody+'<RequestHandler xmlns="http://tempuri.org/">';
strBody=strBody+'<SID>PUB0000554</SID>';
strBody=strBody+'<InputData>string</InputData>';
strBody=strBody+"<Token2>TOKEN2</Token2>";
strBody=strBody+"<TicketNo>TicketNo</TicketNo>";
strBody=strBody+'</RequestHandler>';
strBody=strBody+'</soap:Body>';
strBody=strBody+'</soap:Envelope>';
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.loadXML(strBody);
那接下来如何修改InputData节点的值?如果要在这个节点加入另外一个xml可行吗?加入完的xml需要通过soap的方式传递信息 比如
xmlHttp.onreadystatechange=doHttpReadyStateChange3;
xmlHttp.open("POST", "http://www.cp.gov.tw/SEWebApplication/OMmediator.asmx", false);
xmlHttp.setRequestHeader("HOST","www.cp.gov.tw");
xmlHttp.setRequestHeader("Content-Type","text/xml; charset=utf-8");
xmlHttp.setRequestHeader("Content-Length",strBody.length);
xmlHttp.setRequestHeader("SOAPAction","http://tempuri.org/GetTicketNo");
xmlHttp.send(strBody); 用这样的方式要怎么把处理后的xml给传过去? 展开
strBody=strBody+'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
strBody=strBody+'<soap:Body>';
strBody=strBody+'<RequestHandler xmlns="http://tempuri.org/">';
strBody=strBody+'<SID>PUB0000554</SID>';
strBody=strBody+'<InputData>string</InputData>';
strBody=strBody+"<Token2>TOKEN2</Token2>";
strBody=strBody+"<TicketNo>TicketNo</TicketNo>";
strBody=strBody+'</RequestHandler>';
strBody=strBody+'</soap:Body>';
strBody=strBody+'</soap:Envelope>';
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.loadXML(strBody);
那接下来如何修改InputData节点的值?如果要在这个节点加入另外一个xml可行吗?加入完的xml需要通过soap的方式传递信息 比如
xmlHttp.onreadystatechange=doHttpReadyStateChange3;
xmlHttp.open("POST", "http://www.cp.gov.tw/SEWebApplication/OMmediator.asmx", false);
xmlHttp.setRequestHeader("HOST","www.cp.gov.tw");
xmlHttp.setRequestHeader("Content-Type","text/xml; charset=utf-8");
xmlHttp.setRequestHeader("Content-Length",strBody.length);
xmlHttp.setRequestHeader("SOAPAction","http://tempuri.org/GetTicketNo");
xmlHttp.send(strBody); 用这样的方式要怎么把处理后的xml给传过去? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询