如何使用 Javascript 在 HTML 页面中将 XML 显示为可折叠和可展开的树? [英] How to display XML in a HTML page as a collapsible and expandable tree using Javascript?
问题描述
如何将 HTML 页面中的 XML 文档显示为可折叠和可展开的树?
How to display a XML document in a HTML page as a collapsible and expandable tree?
我想在 HTML 页面中显示一个 XML 文档,作为一个非常漂亮的打印树结构.我希望能够展开和折叠树枝.例如,当您加载纯 XML 文件时,Firefox 浏览器会执行此操作.我正在寻找如何在客户端使用 JavaScript 执行此操作.
I'd like to display a XML document inside a HTML page as a nicely pretty printed tree structure. I'd like to be able to expand and collapse tree branches. For example Firefox browser does this when you load a plain XML file. I am looking how to do this in client-side with JavaScript.
推荐答案
创建 XML 查看器使用 JScript - Exsead XML Power Scripting
似乎有比我多年前在上面列出的更好、更易于使用的替代方案:
There seems to be a better and easier-to-use alternative than what I listed above many years ago:
希望他们有所帮助.
这篇关于如何使用 Javascript 在 HTML 页面中将 XML 显示为可折叠和可展开的树?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!