100·ÖÇóÖúJSµÄ½âÎöÒ»¶ÎXML,NETBOX·â×°³ö´í¡£¡£¡£¡£¡£
ÒÔÏ´úÂëÔÚIEÏÂÊÇ¿ÉÒÔÕý³££¬µ«ÊÇÓÃNETBOX·â×°¾Í²»ÐÐÁË£¬ÔËÐе½ºìÉ«µÄµØ·½¾Í³ö´íÁË£¬ËµÈ±ÉÙ¶ÔÏñ£¬ÇëÎÊÔõôÑùÐ޸ġ£
JScript code:
//////////////////// AJAXÀà////////////////
function getxmlDoc(){
var xmlDoc=null;
if(window.ActiveXObject){
var i,activeXarr;
var activeXarr = ["Microsoft.XmlDom","MSXML.DOMDocument","MSXML2.DOMDocument","MSXML3.DOMDocument","MSXML4.DOMDocument"];
for(i=0; i<activeXarr.length; i++){
try{
xmlDoc = new ActiveXObject(activeXarr[i]);
xmlDoc.async=false;
return xmlDoc;
}catch(e){}
}
}else if (document.implementation && document.implementation.createDocument){
xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.async=false;
return xmlDoc;
}else{
alert("Your browser cannot handle this script");
}
}
/////////////////////////////////////////
var xmlDoc =new getxmlDoc();
var url =strUrl+".asp?"+str; // URLΪdefault.asp
xmlDoc.load(url);
var px= xmlDoc.getElementsByTagName("price"
Ïà¹ØÎÊ´ð£º
vbÖÐÔõôͨ¹ýxmlÀ´½âÎöÊý¾Ý¿âÖеÄ×Ö¶ÎÖµ¡£
û°ì·¨ÓÃXML½âÎöÊý¾Ý¿âµÄ×Ö¶ÎÖµ£¬³ý·ÇÊý¾Ý¿âÖб£´æµÄÊÇXML¸ñʽµÄ×Ö·û´®Îĵµ¡£
XMLÓÃÀ´Õ¹Ê¾²ã´ÎµÄÊý¾Ý¡£
Êý¾Ý¿âÒ»°ãÊǶþάÊý¾Ý¡£
Êý¾Ý¿âÖб£´æµÄÊÇXML×Ö·û´®¸ñʽ£ ......
ÎÒÓиöflash Êý¾Ýд³ÉÁË xmlÐÎËÆ...
ÏÖÔÚflashÈ´¶ÁÈ¡²»ÁË ¶¯Ì¬Éú³ÉµÄxml...ÐÎÈ磺x.jsp?id=6 £¿£¿£¿
½«¶¯Ì¬Éú³ÉµÄxmlÁí´æΪ x.xml ºó flash±ã¿ÉÕý³£¶ÁÈ¡ ÇëÎÊÕâÊÇʲôÔÒò£¿£¿£¿
¹Ø×¢
²»¶®°ï¶ ......
xmlÎļþ ÄÚÈÝΪ£º
<?xml version="1.0" encoding="utf-8" ?>
<UserInfo>
<User>
<name>jyhlp </name>
&n ......
ÎÒÊÇÀûÓÃaxiom¶Ôxml½øÐнâÎö£¡
µ«È´³öÏÖÏÂÃæµÄ´íÎó£¡
Exception in thread "main" org.apache.axiom.om.OMException: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxUnexpectedCharEx ......
·µ»ØÈçÏÂxml×Ö·û´®£º
<?xml version="1.0" encoding="utf-8" ?>
<DeliverMsg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www ......