top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

converting XML to text in Linux

+4 votes
1,568 views

Is there anything offered in linux that might convert an XML file to a plain text file?

My hopes are that it is flexible enough to make the following type of line:

Guide

into something like:

title: Guide

along with all the other fields. It'd be nice if it could handle multiple lines inside a single tag line as well.

posted Nov 7, 2013 by Naveena Garg

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Pretty easy to do with XSLT...
google: perl XML to text
Hit #4:

1 Answer

+1 vote

XSLT is probably your best bet for a long-term solution (as opposed to a simplistic regex match via a scripting language) because it allows you great future flexibility.

answer Nov 7, 2013 by Dewang Chaudhary
Or perl with XML::Twig which gives you a full featured parser and complete control of what you do with the parsed value. If you lean more towards the java way of doing things than perl, you could use groovy for fairly painless scripting with fairly complete xml handling tools.
Similar Questions
+2 votes

What is the easiest way to convert a webpage into a jpg or png file? I've seen several programs that can do
various conversions, but nothing open source that can do it in a single conversion.

+5 votes

How to converting a PuTTY Private Key Files(PPK) file to a Privacy Enhanced Mail (PEM) file for accessing AWS ec2 instances on Linux?

+1 vote
...