Hi Adrienne,
If you're looking to render XML (rather than just format it) and If you're already using oXygen for editing/authoring the XML files, then oXygen can definitely be of use. It has some built-in stylesheets in their "Author" view for a variety of well-known flavours of XML (e.g. TEI, DocBook, JATS); you can also use oXygen to associate a CSS stylesheet with any XML to make it a bit more readable (see https://www.oxygenxml.com/doc/versions/28.1/ug-editor/topics/dg-css-support-in-author.html). However, a lot of the tools in oXygen or otherwise are going to depend on what kind of XML you're working with.
Otherwise, I can't think of any generic XML viewers, but if you happen to be using TEI, then you could also look at CETEIcean, which renders TEI in the browser as custom elements: https://github.com/TEIC/CETEIcean . Even if you're not using TEI, though, this approach might be useful (though not really a lightweight solution).
All best,
Joey
⎯
Joey Takeda, MLIS
Developer, Digital Humanities Innovation Lab
Simon Fraser University Library
[log in to unmask]
Unceded territory of the səl̓ilw̓ətaʔɬ (Tsleil-Waututh), kʷikʷəƛ̓əm (Kwikwetlem), Sḵwx̱wú7mesh Úxwumixw (Squamish), and xʷməθkʷəy̓əm (Musqueam) Nations
On Mar 30, 2026, at 11:37 AM, Paul R. Butler <[log in to unmask]> wrote:
I use Notepad++ and the "XML tools" plugin. It has a "pretty print" function that has served me well for years. I've used Oxygen before, but it offered way more than I needed for most tasks.
Cheers, Paul
Paul Butler | Dartmouth Libraries Discovery Systems Librarian | Dartmouth | Hanover, NH, 03755
-----Original Message-----
From: Code for Libraries <[log in to unmask]> On Behalf Of Eric Lease Morgan
Sent: Monday, March 30, 2026 2:26 PM
To: [log in to unmask]
Subject: Re: [CODE4LIB] Human readable XML hacks?
On Mar 30, 2026, at 2:14 PM, Canino, Adrienne <[log in to unmask]> wrote:
Anyone have a favorite tool for make XML 'render' into a document friendlier for humans to read?
Latex? Oxygen Editor? Ideally this would be a lightweight tool on a local machine (meaning chromebook friendly) or browser magical widget.
--
Adrienne Canino (she/her)
Data Librarian (MLIS)
TetraTech Ocean Sciences
Anchorage, Alaska
Yes, XML can be difficult to read, and, in general, there are two ways to make it more readable: 1) formatting it, and 2) transforming it. The former is relatively easy through the use of a widely available command-line program called xmllint. Try:
$ xmllint --format <file.xml>
Xmllint will look at your file, verify that it is well-formed (or not), and then collapse and indent things for more easier reading. You can pipe the result through to a pager to see the result one screen at a time, kinda like this:
$ xmllint --format <file.xml> | less -S
A program called HTML Tidy does much the same thing. [1]
If you want to make your XML really easier to read, then maybe you are wanting to transform the XML into some other format, like HTML, a plain text file, a CSV file, et cetera. If you want to do these sorts of things, then that is something else altogether.
Finally, while searching for Tidy I see there may be more than a handful of Web-based tools to make your XML easier to read. I haven't tried any of them.
[1] https://www.html-tidy.org/documentation/
--
Eric Morgan <[log in to unmask]>
|