Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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"


Ïà¹ØÎÊ´ð£º

ΪºÎjspÊä³öµÄxml²»ÄÜÕý³£µ÷Óã¿£¿

ÎÒÓиöflash Êý¾Ýд³ÉÁË xmlÐÎËÆ...

ÏÖÔÚflashÈ´¶ÁÈ¡²»ÁË ¶¯Ì¬Éú³ÉµÄxml...ÐÎÈ磺x.jsp?id=6 £¿£¿£¿

½«¶¯Ì¬Éú³ÉµÄxmlÁí´æΪ x.xml ºó flash±ã¿ÉÕý³£¶ÁÈ¡ ÇëÎÊÕâÊÇʲôԭÒò£¿£¿£¿

¹Ø×¢

²»¶®°ï¶ ......

xmlÅäÖõÄСÎÊÌâ

struts.xmlСÎÊÌâ
<global-exception-mappings>
<exception-mapping exception="com.ssh.common.core.ProjectException" result="exception" />
</global-exce ......

XMLɾ³ý맪ÓÐÌõ¼þµÄ×Ó½Úµã

<power_line>
<name>¼Î»ª305Ïß </name>
<sap_id>5020-S-0000-0065 </sap_id>
        <dydj>35kV </dydj>
<poles>
......

Ôõô°Ñ¿Í»§¶Ë´Ówebservice»ñµÃµÄxmlת»»³Érecordset£¿

ÈçÌâ¡£
webServiceµÄº¯ÊýÈçÏ£º
VB.NET code:

Public Function RecordSetBySql(ByVal Sql As String) As XmlDataDocument
Dim xRs As ADODB.Recordset
Dim cmd As ADODB.Command
......

¼±£¬¹ØÓÚxmlµÄ½âÎöÎÊÌ⣡£¡£¡£¡£¡£¡£¡£¡

XML code:
<?xml version="1.0" encoding="utf-8"?>
<Map>
<Style name="line">
<Rule>
</Rule>
</Style>
&l ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ