If the file is an XML table, you can open it in LibreOffice Calc through the Data > XML Source menu1. Inside it, you just need to open the XML file, point to the table you're importing on the left column and specify a destination in your sheet in the right text field. Example:

This feature is documented in the Help for LibreOffice Calc and at https://wiki.documentfoundation.org/Development/Calc/XMLSource .
1 Since this is an experimental feature (at least in V 6.1.3.2), it may be unreliable and the menu entry will be greyed out unless experimental features are enabled with Tools – Options – LibreOffice – Advanced – Enable experimental features.
Answer from Waldir Leoncio on askubuntu.comI'm looking for an xml viewer to be able to read (or convert) an xml document into a normal human readable text document. I am NOT looking for an editor.
I'm looking for an xml viewer to be able to read (or convert) an xml document into a normal human readable text document.
Define "convert". Because an XML document is already human-readable. Which begs the question "which conversion?" What output format do you want and what is in the original XML file? Can the original document support the desired output format?
You need to say:
-
What the original XML document contains.
-
What output format you want the XML content to be converted into.
And no, there is no single, simple answer.
XML is already human readable. I'm not entirely sure what you expect this viewer to do. If you know what's in the XML you can use XSL transformer and the xsltproc command to convert the result to text / pdf.
sed - how to read xml file in linux - Stack Overflow
linux - Decent KDE XML viewer? - Stack Overflow
text formatting - How do I actually read an XML file in human form that makes sense? - Unix & Linux Stack Exchange
xml viewer
I'm looking for an xml viewer to be able to read (or convert) an xml document into a normal human readable text document.
Define "convert". Because an XML document is already human-readable. Which begs the question "which conversion?" What output format do you want and what is in the original XML file? Can the original document support the desired output format?
You need to say:
-
What the original XML document contains.
-
What output format you want the XML content to be converted into.
And no, there is no single, simple answer.
More on reddit.comIf the file is an XML table, you can open it in LibreOffice Calc through the Data > XML Source menu1. Inside it, you just need to open the XML file, point to the table you're importing on the left column and specify a destination in your sheet in the right text field. Example:

This feature is documented in the Help for LibreOffice Calc and at https://wiki.documentfoundation.org/Development/Calc/XMLSource .
1 Since this is an experimental feature (at least in V 6.1.3.2), it may be unreliable and the menu entry will be greyed out unless experimental features are enabled with Tools – Options – LibreOffice – Advanced – Enable experimental features.
You can also use basex from the software center.
sudo apt-get install basex
BaseX is a very fast and light-weight, yet powerful XML database and XPath/XQuery processor, including support for the latest W3C Full Text and Update Recommendations. It supports large XML instances and offers a highly interactive front-end (basexgui).
I don't have it installed but it has really high ratings from the software center.
Use xmlstarlet.
$ cat x.xml
<?xml version="1.0"?>
<void method="put">
<string>LANGUAGE</string>
<string>en</string>
</void>
$ xmlstarlet sel -t -c '/void/string[2]/text()' x.xml
en
Or use xmllint.
$ xmllint --xpath '/void/string[2]/text()' x.xml
en
More about XPath.
You can use this sed,
sed -n '/LANGUAGE/{N; s/.*<string>\(.*\)<\/string>.*/\1/p; }' Locale.xml
Late answer here: Ubuntu repository has a very good utility called xmlto that could help you. It converts xml to a variety of formats, including plain text, epub, pdf.
Online, there is Oxgarage which has many conversion options.
I wrote up a very simple Python script that will read in an xml file, and output its contents into another file:
import sys
inFile = open(sys.argv[1], 'r')
outFile = open(sys.argv[2], 'w')
read = True
for i in inFile.read():
if i == '<':
read = not read
if read:
outFile.write(i)
if i == '>':
read = not read
Save this as readxml.py and then call it from the shell like this: $ python readxml.py input.xml output.txt . It's really rudimentary, so it might not be what you're looking for exactly, but it's something!