[ALUG] Viewing XML files

Richard Lewis richardlewis at fastmail.co.uk
Tue Oct 16 16:53:26 BST 2007

On Tuesday 16 October 2007 16:33:31 Mark Rogers wrote:
> They're not formatted - there are no line breaks in the files -
> I don't really want to have to preprocess the files to tidy them
> before opening, though, as the files change frequently.

Therefore this may not be all that helpful, but I use this to make 
unreadable XML readable:

$ xmllint --format file.xml

> What are good (preferably GUI) tools for this kind of thing?

Again, it doesn't quite fit your requirements, but I use 
nxml-mode[2] in emacs and I haven't yet managed to make it struggle 
with large files.

Another thing you could consider (but, again, straying a bit far 
from your question) is using XPath to get the bits you want. Lots 
of tools do that including xmlstarlet[3], XML::XPath[4] (includes 
an xpath command), and (my favourite) Python lxml[5].


[1] http://xmlsoft.org/xmllint.html
[2] http://www.thaiopensource.com/nxml-mode/
[3] http://xmlstar.sourceforge.net/
[4] http://search.cpan.org/dist/XML-XPath/
[5] http://codespeak.net/lxml/
Richard Lewis
JID: ironchicken at jabber.earth.li
|Please avoid sending me Word or PowerPoint attachments.|
|http://www.gnu.org/philosophy/no-word-attachments.html |

More information about the main mailing list