Delphi的XMLDocument问题,加载返回的XML串时出现“An Invalid chraracter was found in text content”
我的一段代码(摘录,其他的执行正常):
XMLDocument1.XML.Add(cXMLStr);
oReg:=CoXMLHTTPRequest.Create();
oReg.open('POST',SysInf.cURL,False,varEmpty,varEmpty);
oReg.send(XMLDocument1.XML.Text);
ShowMessage(oReg.responseText); //这里显示正常
XMLDocument1.XML.Clear ;
XMLDocument1.Add(oReg.responseText);
XMLDocument1.Active := True;
一执行到XMLDocument1.Active := True这句时出现错误,提示“An Invalid chraracter was found in text content”,不知是何原因,请大虾帮忙。
XML串内容正常,可以在IE中显示。