易截截图软件、单文件、免安装、纯绿色、仅160KB

Retrieving an XML document using Ajax


Retrieving an XML document using Ajax
http://www.javascriptkit.com/dhtmltutors/ajaxgetpost3.shtml
When making a server request in Ajax, the data returned can be in either
plain text/html, or an XML document instead. The later is technically
just a text file as well, but with some special instructions, Ajax can
retrieve that well formed XML text file and return it back to you as a
XML object. This enables the XML data to be easily parsed using
standard DOM
methods
.
Here's a simple XML document in RSS format I'll be using for illustration (lets name it "javascriptkit.xml
"):
<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="0.91">
<channel>
<title>JavaScriptKit.com</title>
<link>http://www.javascriptkit.com</link>
<description>JavaScript tutorials and over 400+ free scripts!</description>
<language>en</language>

<item>
<title>Document Text Resizer</title>
<link>http://www.javascriptkit.com/script/script2/doctextresizer.shtml</link>
<description>This script adds the ability for your users to toggle your
webpage's font size, with persistent cookies then used to remember the
setting</description>
</item>

<item>
<title>JavaScript Reference- Keyboard/ Mouse Buttons Events</title>
<link>http://www.javascriptkit.com/jsref/eventkeyboardmouse.shtml</link>
<description>The latest update to our JS Reference takes a hard look at
keyboard and mouse button events in JavaScript, including the unicode value
of each key.</description>
</item>

<item>
<title>Dynamically loading an external JavaScript or CSS file</title>
<link>http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml</link>
<description>External JavaScript or CS


相关文档:

jQuery 获取xml数据在IE中无效的问题

前段时间用jQuery做了个小练习,获取本地的xml数据,在firefox下面测试没问题,但是在IE下面总是获取数据失败,上网找了很久也没找到是怎么回事。郁闷了很长一段时间,今天有空又把这个问题拿出来研究了下,最后终于找到原因了,把页面放到服务器去浏览就OK了。难道是权限问题?不知道怎么火狐在本地目录可以获取数据成功。 ......

一个用Dom4j解析xml的例子

一、测试用的em.xml
<?xml version="1.0" encoding="GB2312"?>
 <EW cmd="login" mod="Login" version="6.0">
   <Source uns="" type="user"/>
   <Username>zhangzhiyun@hp</Username>
   <Password>111111</Password> ......

使用dom4j解析XML例子

包括三个文件:studentInfo.xml(待解析的xml文件), Dom4jReadExmple.java(解析的主要类), TestDom4jReadExmple.java(测试解析的结果) (由于使用csdn blog自带的代码粘贴工具会朝里加入一些"..."字符,虽然利于查看,但是不利于把代码copy出来运行,而亲自运行代码对程序员来说是很重要的,故没有使用csdn blog自带的代码粘 ......

xml处理

JAXBContext jc = JAXBContext.newInstance(ICPBuildSummaryXO.class);
   Unmarshaller u = jc.createUnmarshaller();
   ICPBuildSummaryXO xo = (ICPBuildSummaryXO) u.unmarshal(node);
   ICPBuildSummary summary = new ICPBuildSummary();
   Bean ......

ASP.NET IIS使用错误 无法显示 XML 页

windows xp下IIS安装后。
开始显示的错误为
 无法显示 XML 页。
        使用 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。
        ------------------------------------------------------------------------- ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号