Hello again!
Yes, you can. Your echo statement has errors, take a look at this example:
Code:
XPATH="<tag>Some text parsed from xpath</tag>"
Now the variable
$XPATH holds a string with tags just like your example.
You can remove the tags in the variable like this:
Code:
echo $XPATH | sed 's/^<tag>\(.*\)<\/tag>/\1/'
Some text parsed from xpath
You can even assign the new string, without the tags to a new variable "on the fly" if you like:
Code:
NOTAGS=$(echo $XPATH | sed 's/^<tag>\(.*\)<\/tag>/\1/')
echo $NOTAGS
Some text parsed from xpath
I hope that helped to clear things up.
Best regards,
HMW
Edit:
In your case, you ought to be able to do something like this:
Code:
NOTAGS=$(xpath my.xml //tag | sed 's/^<tag>\(.*\)<\/tag>/\1/')