|
Hi,
I'm new to the XML::SAX parser (also new to XML parsing, my previous XML parsing method was only using regex..).
First I couldn't understand how to get the attributes out of the hashes. I really missed some example were they showed how to do that. Cause there is a XML::INTRO on cpan, but no real example in it.
Ok but now the problem I can't figure out how to get all my data from an element. It's a like a comment tag that I need to parse, but it's long with all kinds of characters in it.
What I have:
sub characters {
my ($self, $characters) = _;
my $text = $characters->{Data};
$text =~ s/^s*//;
$text =~ s/s*$//;
return '' unless $text;
if ($current_element eq 'Comment'){
$hash{'Comment'}=$text;
}
}
But the problem is that $text doesn't have the complete comment entry. I know it stops here: "(3&apos" (where "(3" last thing stored).
Sorry if this is already explained earlier to someone, but I couldn't find it on the internet and not on this mailinglist.
Can someone show me?
Btw. Is the sub Characters the one to take to get the data from between the tags?
Greetings,
Jelle
|