如何用WebService返回的xml字符串来组装一个字符串(如何用javascript如何编写)
<script language="vbscript">
sub GetClassList(m)
slm = m.value
set doc = dso.XMLDocument
'返回一个字符串
stPath = "Http://localhost/hello/XmlData/getArticleClass.asmx/GetClassByFatherId?keyword=" + slm
'document.write(stPath)
'if doc.xml="" then
Set doc = CreateObject("MSXML2.DOMDocument")
doc.async = False
doc.load stPath
'
doc.loadXML replace(replace(doc.xml,"<","<"),">",">")
dso.load doc
set doc = dso.XMLDocument
'end if
set nodeList=doc.documentElement.getElementsByTagname("Table")
pty = ""
for each node in nodeList
pty = pty & "<option value='" & node.selectSingleNode("ClassId").text & "'>" & node.selectSingleNode("ClassName").text &"</option>"
next
classTD.innerHtml = "<select class='cls_td_drpdwn' size='1' name='ClassId' id='ClassId' size='1'>" & pty & "</select>"
end sub
</script>