String to XML Document

程序名称:String to XML Document

授权协议: 未知

操作系统: 未知

开发语言:

String to XML Document 介绍

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>

String to XML Document 官网

http://plugins.jquery.com/project/createXMLDocument

相关编程语言

多功能下拉选择插件 SelectPage 简洁而强大的下拉分...
AutoComplete 是一个 jQuery Mobile 的插件,用于实...
Combogrid 是一个jQuery插件用于为输入框添加高级自...
Autobox2这个jQuery插件,可以用于创建类似于Facebo...
Link Scraper TextBox 是一个文本框的扩展插件,当你...
Awesomplete 超小超好用的超漂亮的 autocomplete 框...