I have a .txt file that I have to extract news stories from.
The stories are laid out in the .txt file like this...
<story>
<headline>Todays headline</headline>
<date>2001-10-18</date>
<summary>News item</summary>
</story>
This is repeated about 5 or 6 times, depending on the amount of news that day.
I need to detect each and every headline,summary etc, but when I try and fine the start and close tags of say, headline, i am finding the first and last tags, and where I want to see a one line output, I am getting nearly the whole text file. Make sence?
I need to pick out each headline, each date, not just one, and not the whole file ;-)
I have followed my books as far as I can, and looked loads on0line for a way round this, but I just cannot fathom it.
Can anybody please help me sort this problem out???
Tris...