in reply to XML::Parser - Obtaining Attributes

I, too, would use something other than XML::Parser, (e.g. XML::Rules), but to answer your question, you need to tell the parser what your handlers are:
my $parser = new XML::Parser( Handlers => { Start => \&StartTag, }, );

Replies are listed 'Best First'.
Re^2: XML::Parser - Obtaining Attributes
by DanielSpaniel (Scribe) on Jan 25, 2014 at 00:41 UTC
    Thanks for the comment.

    Actually it defaults to the sub StartTag anyway, so no worries there, and the script has no problems processing the rest of the file; it really is just the attributes bit that I have an issue with.

    If I can't meet with any success then I guess maybe I'll have to use another module, but I'd really rather find out why this particular bit won't work.

      Actually it defaults to the sub StartTag anyway,

      I see that now (when you call with Style => 'Stream'), but if you read more closely, you'll see that with the Stream style, it does not call the sub with the arguments in @_. The attributes, e.g., are in %_.