Substring problem

I have a file which comes with a few tags and some contents inside them.
eg:
<ABC>Hello Unix.com</ABC>
<XYZ>WWSHF</XYZ>
Now I want to pick out the contents in between the tags <ABC> and </ABC>.
The contents within <ABC> and </ABC> spans more than one line. So greping and cutting is not an option i guess.
Thanks in advance.

# remove most HTML tags (accommodates multiple-line tags)
sed -e :a -e 's/<[^>]*>//g;/</N;//ba'

$ cat tst2
<ABC>Hello Unix.com</ABC>
$ cat tst2|sed -e :a -e 's/<[^>]*>//g;/</N;//ba'
Hello Unix.com

This should work:

echo '<ABC>Hello
Unix.com</ABC>
<XYZ>WWSHF
</XYZ>' | sed 's/<[^>]*>//g'

i guess i also found out a sloution from somewhere, although i'm still to come to terms with this sed command (just one of those things you know :frowning: ) ...
sed -e 's/<ABC>//' -e 's/<\/ABC>//' filename > newfilename
Thanks a lot for your help.

if you have PHP

<?php
$file="file";
$data=file_get_contents($file);
$data=strip_tags($data,"<ABC>");
$startindexabc = strpos($data,"<ABC>") + strlen("<ABC>");
$endindexabc = strpos($data,"</ABC>");
echo substr($data,$startindexabc,$endindexabc-$startindexabc );
?>

output

# more file
<ABC>Hello Unix.com
some other stuff
some other tags
</ABC>
<XYZ>WWSHF</XYZ>
# php5 test.php
Hello Unix.com
some other stuff
some other tags