Pimp your XML-tree

Posted by

XML Viewer
Folded nodes get highlighted in XML Viewer

Get the help of browser extensions to make Enonic's XML output a bit prettier and easier to handle. The benefits include improved visuals, support for search with xpath, and the ability to export xpath from nodes.

Enonic spits out XML-files full of juicy data that we transform with our XSLT-templates to make them into pretty websites. Most of the time we just write our xpath and things work. But we also check the raw XML-output a lot with our beloved ICE-tool.


When viewing XML raw in a browser, it doesn't exactly look pretty. Far from it. And you can't even search it by xpath, which would be the most natural way to find things in XML.

Browser extensions to the rescue! Well, at least for Chrome as I have yet to find a good tool for this in Firefox.

XML Tree

The two most popular extensions are XML Tree and XML Viewer. They do practically the same thing. XML Tree has the instant XSL-transform tool where you can run your own XSL on the current XML - live. It can also export the xpath of a node for you. But this tool doesn't look so pretty, whereas the XML Viewer does. XML Viewer however is not that feature rich and lacks both live XSL-testing and xpath export.

Go ahead and try them out if you haven't already! Just install the extension and reload any XML page you're viewing and it should work.