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.

Answer from user1907906 on Stack Overflow
🌐
Linux Questions
linuxquestions.org › questions › linux-software-2 › xml-viewer-647460
xml viewer
June 6, 2008 - What can I use to view xml files? Are there any recommended xml applications? I can only seem to view them in their raw text file format. The only
Discussions

sed - how to read xml file in linux - Stack Overflow
I have one xml file as below, I need "en" using some unix command. LANGUAGE en More on stackoverflow.com
🌐 stackoverflow.com
text formatting - How do I actually read an XML file in human form that makes sense? - Unix & Linux Stack Exchange
I downloaded a catalog and it is in XML format. How do change it from code to human-readable form, and ideally save it as a plain text file? I've never worked/seen these before; I tried messing with More on unix.stackexchange.com
🌐 unix.stackexchange.com
August 1, 2014
linux - Decent KDE XML viewer? - Stack Overflow
what's your XML viewer of choice from within KDE? Something that formats the XML decently. I've searched around but have not found anything reasonable. More on stackoverflow.com
🌐 stackoverflow.com
Viewing xml data in Linux? - Stack Overflow
I know variations of this question have been asked but I'm still trying to find the best answer. I have xml file which is about 470 MB and I'd like to navigate through it to see what the data looks... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › fralau › xmlshow
GitHub - fralau/xmlshow: Settle for LESS: a fast and super-simple XML viewer for command-line · GitHub
xmlshow is a super-simple XML viewer for the Unix command line, which should provide most everything you could wish, since uses the features of less.
Author   fralau
🌐
Wikihow
wikihow.com › computers and electronics › operating systems › linux › 4 easy ways to run an xml file on linux
4 Easy Ways to Run an XML File on Linux
November 7, 2023 - You can use XMLStarlet in your scripts to query, transform, or check the data in any XML file. This tool is installed by default if you're using RedHat or CentOS. On most other distributions, you'll need to install it from your package manager. On Ubuntu, Debian, and Linux Mint, use the command sudo apt install xmlstarlet to install the package.
🌐
Qxmledit
qxmledit.org
QXmlEdit - simple XML editor
Chances are that you can find QXmlEdit ... in your Linux distribution. Information about license, source code, support and mailing list in the info page. Hierarchical customizable view of XML elements. Fast XML hierarchy navigation. Split of big XML files. Search supporting XPath expressions. Base 64 data handling. Custom visualization styles. XML Schema (XSD) viewer...
🌐
Opensource.com
opensource.com › article › 21 › 7 › parse-xml-linux
Use XMLStarlet to parse XML in the Linux terminal | Opensource.com
July 16, 2021 - XMLStarlet is installed by default on CentOS, Fedora, and many other modern Linux distributions, so just open a terminal and type xmlstarlet to access it.
🌐
UbuntuMint
ubuntumint.com › home › linux commandline tips › how to parse or view xml code in linux command line
How to Parse or View XML Code in Linux Command Line
July 24, 2023 - The xmlstarlet command-line-based XML toolkit is associated with a single xml executable. It first needs to be installed on your Linux distribution.
Find elsewhere
🌐
Linux.com
linux.com › home › news › open source xml editors examined
Open source XML editors examined - Linux.com
February 28, 2005 - KXml Editor is a lightweight XML editor and viewer that interfaces exceptionally well with other KDE applications. You can configure Konqueror to use the KXml Editor KPart as an XML view interface component. With its extensive assortment of excellent keyboard shortcuts, KXml Editor facilitates ...
🌐
Stack Overflow
stackoverflow.com › questions › 27940046 › viewing-xml-data-in-linux
Viewing xml data in Linux? - Stack Overflow
If it is OSM XML (which I guess from the tagging) you can download a smaller xml when clicking e.g. on 'export' of the official osm.org page. Do that for a smaller area and you can open it in a browser and learn about it and start coding how to parse it, especially when you create unit tests you should do so for a smaller xml file.
🌐
Coderanch
coderanch.com › t › 640947 › os › open-xml-file-unix
How to open xml file from unix (GNU/Linux forum at Coderanch)
When you ask for commands, I assume you want to view them from the Command Line Interface? vim somefile.xml unzip somearchive.zip
🌐
SourceForge
sourceforge.net › home › open source software › formats and protocols › data formats › xml software
Best Open Source Linux XML Software 2026
QXmlEdit is a simple XML editor written in qt. Its main features are unusual data visualization modes, nice XML manipulation and presentation and it is multi platform. It can split very big XML files into fragments, compare XML and XSD files, and has a graphical XSD viewers.
🌐
Linux Mint Community
community.linuxmint.com › software › view › xmlcopyeditor
Linux Mint - Community
XML Copy Editor is an XML editor focusing on editing document markup languages like DITA, DocBook, WordprocessingML.
🌐
FOSS Linux
fosslinux.com › home › programming › 5 simple ways to parse an xml file on linux
5 Simple Ways to Parse an XML File on Linux | FOSS Linux
May 10, 2023 - Parsing XML files on Linux is a common task for developers and system administrators. This article covered five simple ways to parse an XML file on Linux, including XMLStarlet, xmllint, Python’s xml.etree.ElementTree module, Perl’s XML::LibXML module, and Saxon-HE.
🌐
Sourceforge
xml-copy-editor.sourceforge.io
XML Copy Editor
XML Copy Editor is free software released under the GNU General Public License. It is available in Catalan, Chinese (simplified and traditional), Dutch, English, French, German, Italian, Slovak, Swedish and Ukrainian. There are Linux packages for Arch, Fedora, Gentoo, openSUSE, Slackware and Ubuntu.