"; // You can also directly identify Table var obj = $(xml).find("record"); });
Note: Be sure to wrap a layer of xml outside, so that jquery In order to be recognized, there also needs to be a root node in the xml, which is root or something else that can be customized.
$(document).ready(function(){ $.get('mydata.xml',function(xml) { $(xml).find( "book").each(function(){ var xmlAttr=$(this).attr("Attribute"); var xmlText=$(this).fint("node").text() ; }); }); });
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn