The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-21-2009
oscarmon oscarmon is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 6
read XML xml element with REGEXP

Hi, I would need to read an xml element from an xml file to a local variable. Please could you help me with a shell script to get so? Considering that I have a file called file.xml like below:

<header>
<description>This is the description</description>
<content>This is the content</content>
</header>

What I'd like is to assign the value of "description" tag ("This is the description") to a local variable.

I guess this could be done by usig regular expressions...

Thanks in advance.