JQuery append xmlNode Modifying XML content
Http://blog.darkthread.net/blogs/darkthreadtw/archive/2009/04/29/jquery-xmlext-plugin.aspx
jquery reads XML content as a simple operation, but it is cumbersome to modify. The above gives 1 plugin, you can try:
You can download jquery.xmlext.js to go back to play, or directly in the Mini jquery Lab with the following program to do tests:
$.getscript ("Jquery.xmlext.js", function () {
var xd = $.parsexml ("<items><center/></items>");
var x = $ (XD);
X.find ("center"). Appendxml ("<bottom/>"). Prependxml ("<top/>");
X.find ("Top,bottom"). Afterxml ("<after/>"). Beforexml ("<before/>");
Alert (X.xml ());
var obj = {Name: "Darkthread", score:100};
xd = $.toxml (obj, "person");
Alert ($ (XD). XML ());
xd = $.toxml (obj, "person", true);
Alert ($ (XD). XML ());
});
JQuery append xmlNode Modifying XML content