Folders

How to open .XML files (Extensible Markup Language) on Android, Windows and Linux

What .xml, .xsd, .xsl, .xslt and .plist files are and how to open, read and edit XML data, schemas and property lists for free on Android, Windows and Linux.

Cover: Folders' text editor on two phones, labelled .XML

An app exports your data as backup.xml, an accounting system sends an invoice in XML, or a settings file you need to change turns out to be XML. Tap it on a phone and you may get nothing; open it in a browser and you get a wall of tags with the message “This XML file does not appear to have any style information”.

XML is text. Folders opens .xml files and their relatives, XSD schemas, XSLT stylesheets and text property lists, in its text editor on Android, Windows and Linux, with the tags coloured so the structure is easy to follow.

What is a .xml file?

XML stands for Extensible Markup Language. The W3C published it as a standard in 1998 as a way to store structured data as text that both people and programs can read. Like HTML, it uses tags in angle brackets, but you invent the tag names to suit the data:

<invoice number="1042">
  <customer>Jane Smith</customer>
  <total currency="EUR">249.00</total>
</invoice>

XML is everywhere, often out of sight: Android apps describe their screens in XML layouts, Maven builds use pom.xml, websites list their pages in sitemap.xml, and a Word .docx file is a ZIP full of XML. RSS feeds and SVG drawings are XML too.

The other extensions here are XML files with special jobs:

Extension Language or format What it’s for
.xml XML Data, settings, exports, layouts
.xsd XML Schema Rules a document must follow: which tags, in what order, with what kinds of values
.xsl XSL stylesheet Almost always an XSLT stylesheet; XSL is the name of the wider family
.xslt XSLT Instructions that turn XML into HTML, other XML or text
.plist Apple property list Settings and app information in Apple’s software

A property list comes in two forms. The XML form starts with <?xml and a <!DOCTYPE plist ...> line, and uses tags like <key>, <string> and <dict>. The binary form starts with the characters bplist00 and isn’t text at all, though it holds the same kind of data.

How to open a .xml file with Folders

On Android

  1. Download Folders from the download section and install it on Android 7.0 or newer.
  2. Open it and tap Allow access, then allow All files access.
  3. Find the file in its folder or with the search box. App exports often land in Downloads or Documents.
  4. Tap it to open it in the text editor.

An XML file sent as an attachment opens the same way: tap it and choose Open with → Folders.

On Windows and Linux

  1. Install Folders (Windows installer; deb, rpm, AppImage, Flatpak, Snap or tar.gz on Linux).
  2. Browse to the file in Folders and double-click it.
  3. On Windows, right-click the file in File Explorer and choose Open with → Folders; the installer adds Folders to that menu for the types it opens.

What you can do with it in Folders

  • Coloured markup. Tags, attribute names, quoted values, <!-- comments -->, <![CDATA[ ... ]]> sections and entities such as &amp; are all coloured, so a missing closing tag is easier to spot.
  • Go to a parser error. XML errors give a position, such as “line 213, column 7”. Go to line takes you to the line, and Document info shows the cursor’s line and column, plus the encoding and line endings.
  • Word wrap makes a file saved as one enormous line readable.
  • Find and Find and replace, with Match case, to change a value everywhere it appears, such as a server address in a config file.
  • Edit and Save with undo and redo.
  • Tabs, so an XML file and the XSD or XSLT that goes with it can be open together.
  • Open in hex viewer, which is the way to look inside a binary .plist.

Folders shows XML as text. It doesn’t validate a file against a schema, run XSLT transforms, show a collapsible tree or reformat XML.

Other ways to open .xml files

  • A web browser: drop the file into Chrome, Edge or Firefox to see it as a tree you can fold.
  • Visual Studio Code with Red Hat’s XML extension, which checks files against their XSD.
  • Notepad++ with the XML Tools plugin, on Windows, for pretty-printing and validation.
  • Command-line tools: xmllint --schema rules.xsd data.xml validates, and xsltproc style.xsl data.xml applies a stylesheet.

Problems opening a .xml file?

  • “Not well-formed” or “unexpected token” errors. The usual causes are a bare & that should be written &amp;, a < inside text, or a tag closed in the wrong order. Go to the line the error names and look just before it.
  • Accented letters turn into odd symbols. The first line may say encoding="UTF-8" while the file was really saved as Windows-1252, or the other way round. Document info shows what Folders found.
  • A .plist shows gibberish. It’s a binary property list. Convert it to XML with plistutil from libplist on Linux, or with a few lines of Python using the built-in plistlib module, then open the result.
  • AndroidManifest.xml from inside an APK is unreadable. Android compiles XML in apps into a binary form. Tools such as apktool turn it back into text.

Questions people ask

How do I open an XML file on Android? Install Folders, find the file and tap it. It opens as coloured text, and you can edit and save it.

How do I convert XML to Excel? Excel can import XML through its Get Data options and lay the data out as a table. Folders doesn’t convert XML, though its spreadsheet editor opens CSV if you have the data in that form.

What is an .xsd file? An XML Schema: the rules a set of XML documents must follow. Tools use it to check files and editors use it to suggest tags.

XML vs HTML: what’s the difference? HTML has a fixed set of tags for web pages, and browsers forgive mistakes. XML lets you make up your own tags for any data, and one mistake makes the whole file invalid.

For web pages, see how to open HTML files. Maps, tracks and feeds are XML too: read how to open KML, GPX and RSS files. Or see all 382 file types Folders opens.

Keep reading