On Tue, 19 Jun 2001, Morgan wrote:
> Here is the problem.
> I will recive newsarticles three times a day in xml format and I need to
> automaticly publish those articels on a web page, on the first page it
> should only show the tags down to </INL>
> tag and a link to the whole page.
Well - as mentioned before, you can either try to create a dumb parser
using regexpes, or you use a proper XML Parser (recommended).
You could e.g. try the module XML::Simple - this will parse your XML Text
and convert it into a perl hash:
use XML::Simple;
my $parser= new XML::Simple();
my $hash= $parser->XMLin($text);
and then you will have something similar to the following in your hash:
{
'ord' => 'anbud',
'lev' => '2001-06-14',
'dat' => '14-06-01',
...
}
Please note that XML::Simple is a bit picky about XML syntax, so your
input file should rather be valid XML, and not just text with some tags
somewhere.
--
Markus Peter - SPiN AG
[EMAIL PROTECTED]