streamReader:
dim sr as new streamReader(request.inputStream,system.encoding.getEncoding("gb2312"))
dim str as string = sr.readtoend
STR就是XML文档的文本格式
DOM:
Dim doc As XmlDocument = New XmlDocument
Try
doc.Load(stream)
Catch ex As Exception
Dim buffer(stream.Length) As Byte
stream.Read(buffer, 0, buffer.Length)
Dim strXML As String = System.Text.UnicodeEncoding.GetEncoding("gb2312").GetString(buffer, 0, buffer.Length)
doc.Load(strXML)
End Try
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("post",url地址,false);
xmlhttp.send('');
dom=xmlhttp.responseXML;
只要返回的xml是标准格式的xml数据dom就返回一个xmldocument模型,
然后可用selectNodes,selectSingleNode等方法获取数据