Posted in Javascript onApril 11, 2014
var $xml = $("<aa><bb para=\"bbpara\">bbtext</bb> <cc> cctext </cc><cc>789798</cc>aatext</aa>"); function log(o){ $("textarea").val($("textarea").val()+"\n"+o); } log($xml.text()); log($xml.html()); log($xml.children("cc").html()); log($xml.children("bb").attr("para")); log("each"); $xml.find("cc").each(function(){ log($(this).text()); });
jquery解析xml字符串简单示例
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@