js ½âÎö xml ÊôÐÔ
function init() {
var viewChartID = 0;
var viewChartSum = "" ;
reportName = document.getElementById("reportName").value;
xmlDoc=loadXMLDoc("./charreport/xml/viewChart.xml");
x=xmlDoc.getElementsByTagName('viewChart')[0].childNodes;
for (i=0;i<x.length;i++)
{
//È¡µÃxmlÖеÄgroup µÄÊôÐÔ name
var n=x[i].getAttribute('name');
if(reportName==n) {
var m = x[i].childNodes;
for(var y=0;y<m.length;y++) {
viewChartName = m[y].childNodes[0].nodeValue;
viewChartSum = viewChartSum+"<div id='"+i+"'><a href=javascript:gochart('"+viewChartName+"')>"+viewChartName+"</a></div>";
document.getElementById("viewChart1").innerHTML = viewChartSum;
document.getElementById("viewChart2").innerHTML = viewChartSum;
}
}
}
}
function loadXMLDoc(dname)
{
try //Internet Explorer
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
catch(e)
{
try //Firefox, Mozilla, Opera, etc.
{
xmlDoc=document.implementation.createDocument("","",null);
}
catch(e) {alert(e.message)}
}
try
{
xmlDoc.async=false;
xmlDoc.load(dname);
return(xmlDoc);
}
catch(e) {alert(e.message)}
return(null);
}
<?xml version="1.0" encoding="utf-8"?>
<viewChart>
<group name = "Outage_Details" >
<chart_name>test3</chart_name>
<chart_name>test4</chart_name>
</group>
<group name = "FOPS_Ranking_Analysis" >
<chart_name>test1</chart_name>
<chart_name>test2</chart_name>
</gr
Ïà¹ØÎĵµ£º
¼òµ¥µØ˵£¬xslÊÇ˵Ã÷xmlÈçºÎ±í´ï³öÀ´µÄÑùʽÎļþ£¬¶øxsd¸ø³öxmlÎļþµÄ¸ñʽÃèÊö
Èç¹û˵xmlÊÇÒ»µþ³®Æ±£¬xsd¾ÍÊÇÑé³®»ú£¬¿´¿´ÀïÃæÓÐûÓмٳ®£¬¶øxslÊǵ㳮»ú£¬¿´¿´µ½µ×ÊǶàÉÙÇ®¡£ÓÃxml¿ÉÒÔ²»ÓÃxsd£¬¾ÍÏñ»¨Ç®µÄʱºò²»Ò»¶¨ÒªÑé³®Ò»Ñù£¬µ«ÊÇÊÕÇ®µÄÈËÒ»°ãÊÇÏëÒªÑéµÄ¡£¶ø»¨Ç®µÄʱºò²»Äܲ»µã³®£¬²»µãÄǾͲ»ÊÇ»¨Ç®ÁË£¬ÊÇÍæÇ®¡£µ±È»ÁË£ ......
×î½ü×öµÄÒ»¸öÏîÄ¿ÖÐÔËÓà xml Êý¾Ýµº¼¼Êõ£¬ËùÒÔ°ÑÊý¾Ýµº·½ÃæµÄ֪ʶ×ܽáһϡ£
XML Êý¾Ýµº £¨ data islands £©¾ÍÊDZ» html Ò³ÃæÒýÓûòÕß°üº¬µÄ xml Êý¾Ý£¬ÊÇ´Ó IE5 ¿ªÊ¼ÒýÈëµÄÒ»Ïî¼¼Êõ¡£¿ÉÒÔͨ¹ý xml ±êÇ©ºÜÇáËɽ«Êý¾Ýµº²åÈëµ½ html ÎĵµÖС£ÄÇôÔõô·ÃÎÊ xml Êý¾ÝµºµÄÊý¾ÝÄØ£¬ºÜ¼òµ¥£¬Í¨¹ý xml µÄ id ¡£ÔÚÒ³ ......
·´ÉäÊÇ Java ÓïÑÔ±»ÊÓΪ¶¯Ì¬»ò×¼¶¯Ì¬ÓïÑÔµÄÒ»¸ö¹Ø¼üÐÔÖÊ£¬½áºÏ·´ÉäºÍ XML »á°ïÖúÎÒÃǸü¿ì¡¢¸ü·½±ãµØʵÏÖһЩ¶¯Ì¬´úÂ룬´Ó¶ø½â¾ö±à³ÌÖпÉÄÜÓöµ½µÄ²»È·¶¨ÎÊÌâ¡£±¾ÎĽ«½áºÏ·´ÉäÓë XML ¶Ô Java ±à³ÌµÄ¶¯Ì¬ÐÔ½øÐÐÉîÈëdz³öµÄÌÖÂÛ¡£ÔÚÀí½â±¾ÎĵÄ˼ÏëÖ®ºó£¬Äú¿ÉÒÔ½«ÆäÓ¦Óõ½³ÌÐòÖÐÒÔ´´½¨Áé»îµÄ´úÂë¡£
ÒýÑÔ
ÔÚÏÖʵÉú»îÖУ¬¾³£»á·¢ ......
1£ºÈçºÎͨ¹ýsocket´úÀíÀ´·ÃÎÊ·þÎñ¶Ë£º
String proxyHost =
"192.168.204.212"
;
String proxyPort =
"1080"
;
//֪ͨJavaҪͨ¹ý´úÀí½øÐÐÁ¬½Ó¡£
ÕýÔÚ×°ÔØÊý¾Ý……
System.get ......
Éú³É¶Ë´¦Àí
½«ÒªÐ´ÈëµÄÖµµÄÇ°ºóдÉÏÈç:"<![CDATA[" + string+ "]]>";
XmlNode xnformchild = doc.CreateNode(XmlNodeType.Element, dc.ColumnName.ToUpper(), "");
try
{
xnformchild.InnerXml = drform[dc.ColumnName].ToString( ......