摘要:
functiongetXmlData(xmlData,xpath){varouputXml="<xml>";$(xmlData).find(xpath).each(function(){ouputXml+=$(this)[0].xml.toString().replace(newRegExp($(this)[0].nodeName,"gi"),"row");});ouputXml+="</xml>";returnouputXml;}前提是要 xmlData 转化成 dom 阅读全文