![](/img/trans.png)
[英]Angular treetable (Primeng tree table) - get all the parent node of the chIldren
[英]jQuery get all node names (both parent and children)
我有一个由对象生成的XML文档。 我不知道在jQuery AJAX调用时它会是什么样子。 我想要做的是通过父和子获取节点名称来解析XML。
您可以提供的任何方向都将提供很好的服务。
谢谢!
你应该能够像解析jquery中的DOM元素一样解析XML;
var xml = "<root><stuff></stuff><stuff><stuffchild></stuffchild></stuff></root>";
function alertit(jqueryObject) {
if (jqueryObject.length === 0) return;
jqueryObject.each(function() {
alert(this.nodeName.toLowerCase());
});
alertit(jqueryObject.children());
}
alertit($(xml));
你看过jParse吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.