XML to text
May 27, 2012 3:09 PM   Subscribe

Is there an XML-in, text-out utility?

I downloaded a text file, which came in ZIP format. Inside is the text, which is in XML format. Is there a utility that will load the XML file and output the text? Everything I've found on the web involves programming.
posted by KRS to Computers & Internet (7 answers total) 4 users marked this as a favorite
You can try to import it into Excel - this will work for many XML files that are well formatted and don't contain illegal characters.

Open a copy in Excel (always work on a copy no matter what you try) and follow the dialogs.
posted by bottlebrushtree at 3:36 PM on May 27, 2012

How about XML Grid?
posted by Foci for Analysis at 3:48 PM on May 27, 2012 [1 favorite]

This depends on what the XML format is. Give an example. If it's "flat" (e.g. a series of records with a fixed set of metadata for each record) then it could possibly be converted to a CSV/TSV/excell file. If it's just some kind of formatted text, you'll have to know the format (is it xhtml? docbook? something else?), then you can work on finding tools to convert it to another readable format.
posted by beerbajay at 3:50 PM on May 27, 2012

Posting a short snippet would really help. You should be able to open it with notepad to see the source code.
posted by ElliotH at 4:19 PM on May 27, 2012

Be sure to include the first ten-20 lines when you post the snippet- it has all sorts of useful information.
posted by rockindata at 4:51 PM on May 27, 2012

Were there folders full of mysterious things inside the Zip file along with the XML-ized text? Reason I ask is because both OpenDocument Text (.odt) and Microsoft Office Open XML (.docx) formats consist of Zip archives with a specific internal folder structure and XML-wrapped text. If the Zip file you have is actually in one of these formats, and you can figure out which one, then all you should need to do is rename what you downloaded from whatever.zip to whatever.odt or whatever.docx, then open it with a recent version of OpenOffice/LibreOffice Writer or with Microsoft Word 2007 or later.
posted by flabdablet at 5:28 PM on May 27, 2012

Without knowing anything about the structure of the XML, I'd say Excel or Access or something similar.

As stated above, if you know anything about what program was used to create the XML output, you might be able to go back to the source and get results that way.

Another option might be a more advanced text editor. I haven't used it in a while, but there's an app called NoteTab that offers a feature to strip HTML tags and leave only the text in between tags. The functionality works for XML tags too and depending on how your XML file is set up, this might work for you.
posted by FreelanceBureaucrat at 8:34 PM on May 27, 2012

« Older What is wrong with us?   |   Just got dumped. What should I do tonight? Newer »
This thread is closed to new comments.