日期:2014-05-19  浏览次数:20417 次

请教"WEB1向WEB2发XML数据,得到XML数据并显示."提示"17行少";"且44行缺少对象".错在哪?
WEB1的功能:向WEB2发XML数据,返回XML数据并显示.
"提示 "17行少 "; ",且44行缺少对象 ".错在哪?谢谢!

<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Strict//EN "     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<title> Sending   an   XML   Request </title>
 
<script   type= "text/javascript "   >
  var   xmlHttp;
function   createXMLHttpRequest()   {
        if   (window.ActiveXObject)   {
                xmlHttp   =   new   ActiveXObject( "Microsoft.XMLHTTP ");
        }
        else   if   (window.XMLHttpRequest)   {
                xmlHttp   =   new   XMLHttpRequest();
        }
}
 
function   createXML()   {

        var   xml= " <?xml   version= "1.0 "   encoding= "GB2312 "   standalone= "yes "?> <Msg   Version= "4 "   MsgID= "14012177 "   Type= "Down "   DateTime= "2007-04-05   10:17:13 "   SrcCode= "frew00X10 "   DstCode= "gthi00N01 "   Priority= "1 "   UserName= "Gefdwa "   PassWord= "Hofnjajdw "> <StreamSimpleQuery> <SimpleStream   Index= "0 "   EquCODE= "341200N00001 "   ChandvgyODE= "FYTV-XW "   StartDateTime= "2007-04-04   18:00:00 "   EndDateTime= "2007-04-04   18:10:00 "   Wejkh= "3d2 "   Het= "rt8 "   Fds= "25 "   Bwb= "700000 "   /> </StreamSimpleQuery> </Msg> ";
        return   xml;
}
 


function   sendPetTypes()   {
        createXMLHttpRequest();
 
        var   xml   =   createXML();
        var   url   = "http://127.144.25.202/answer ";

        xmlHttp.open( "POST ",url,false);
        xmlHttp.onreadystatechange   =   handleStateChange;
        xmlHttp.setRequestHeader( "Content-Type ",   "application/x-www-form-urlencoded ");
        xmlHttp.send(xml);
}
 
function   handleStateChange()   {
        if(xmlHttp.readyState   ==   4)   {
                if(xmlHttp.status   ==   200)   {
                        TextArea1.value=xmlHttp.responseText;
                }
        }
}
 
 
function   Button1_onclick()   {
        sendPetTypes();
}

</script>
</head>

<body>
    <