日期:2014-05-16  浏览次数:20380 次

jquery读取xml文件...............................................................新手求解

<script type="text/javascript" src="assets/javascripts/jquery-1.7-vsdoc.js" ></script>
<script type="text/javascript" src="assets/javascripts/jquery.package.js"></script>
<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>
<script type="text/javascript">
        $(document).ready(function() {
            $.post('DateXml.xml', function(d) {
                $(d).find('iWebServer').each(function() {
                    var $iWebServer = $(this);
                    var title = $iWebServer.attr("title");
                    var SystemName = $iWebServer.find('SystemName').text();
var SystemBackground = $iWebServer.find('SystemBackground').text();
var OperatingSystem = $iWebServer.find('OperatingSystem').text();
var SystemRunInfo = $iWebServer.find('SystemRunInfo').text();
var SystemLanguage = $iWebServer.find('SystemLanguage').text();
var SystemDeviseLanguage = $iWebServer.find('SystemDeviseLanguage').text();
var SystemTool = $iWebServer.find('SystemTool').text();
var SystemInfo = $iWebServer.find('SystemInfo').text();
var SystemInfoMore = $iWebServer.find('SystemInfoMore').text();
var SystemExamples = $iWebServer.find('SystemExamples').text();
var iExamplesIndex = $iWebServer.find('iExamplesIndex').text();
var html = '<div class="window_main"><table class="data"><tr>
<th>
&nbsp;"'+title+'"
</th>
</tr>
<tr>
<td>
<table class="data">
<tr><th colspan="2">基本资料</th></tr>
<tr>
<td>项目名称:</td>
<td>"'+title+'"</td>
</tr>
<tr>
<td>系统后台:</td>
<td>"'+SystemBackground+'"</td>
</tr>
<tr>
<td>运行系统:</td>
<td>"'+OperatingSystem+'"</td>
</tr>
<tr>
<td>运行环境:</td>
<td>"'+SystemRunInfo+'"</td>
</tr>
<tr>
<td>研发语言:</td>
<td>"'+SystemLanguage+'"</td>
</tr>
<tr>
<td>设计语言:</td>
<td>"'+SystemDeviseLanguage+'"</td>
</tr>
<tr>
<td>研发工具:</td>
<td>"'+SystemTool+'"</td>
</tr>
<tr>
<td>系统简