javascripthtmlxmltree

How to display XML in a HTML page as a collapsible and expandable tree using Javascript?


How to display a XML document in a HTML page as a collapsible and expandable tree?

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.


Solution

  • Creating An XML Viewer With JScript - Exsead XML Power Scripting

    Update:

    There seems to be a better and easier-to-use alternative than what I listed above many years ago:

    https://www.jstree.com/

    Hope they help.