String to XML Document
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/createXMLDocument
软件介绍
I created a very basic function which allows you to convert XML in a string type, into an XML Document type, which gives you the benefits of XML with AJAX.
I'll write up a better explanation another time, as well as submit some other useful data conversion functions
<script type="text/javascript">
// Name: createXMLDocument
// Input: String
// Output: XML Document
jQuery.createXMLDocument = function(string)
{
var browserName = navigator.appName;
var doc;
if (browserName == 'Microsoft Internet Explorer')
{
doc = new ActiveXObject('Microsoft.XMLDOM');
doc.async = 'false'
doc.loadXML(string);
} else {
doc = (new DOMParser()).parseFromString(string, 'text/xml');
}
return doc;
}
</script>Usage:
<script type="text/javascript">
var text = '<message><from>me</from><to>you</to></message>';
var doc = $.createXMLDocument(text);
</script>jQuery in Action
Bear Bibeault、Yehuda Katz / Manning Publications / 2008-2-17 / USD 39.99
A good web development framework anticipates what you need to do and makes those tasks easier and more efficient; jQuery practically reads your mind. Developers of every stripe-hobbyists and professio......一起来看看 《jQuery in Action》 这本书的介绍吧!
RGB转16进制工具
RGB HEX 互转工具
SHA 加密
SHA 加密工具
