Bash script and xml/rss parsing

CroMag

New Member
i'm writing a small script that parse an rss using xmllint. Now i fetch the titles list with the following command: \[code\]ITEMS=`echo "cat //title" | xmllint --shell rss.xml `echo $ITEMS > tmpfile\[/code\]But it returns: \[code\]<title>xxx</title> ------- <title>yyy :)</title> ------- <title>zzzzzz</title>\[/code\]without newlines, or space. Now i'm interested only in the text content of title tags, and if possible i want to navigate through the titles using a for/while loop, something like: \[code\]for val in $ITEMS do echo $valdone\[/code\]How it can be done? Thanks in advance
 
Back
Top