in reply to Re^2: XML::Parser Tutorial
in thread XML::Parser Tutorial
No it was a response to the root node. For your problem ... show us your code. It's true that the Char handler will never be called, but both the Start and End handlers should. In either case you of course can use XML::Rules for that XML as well, specify a handler for the student tag and it will obtain all the attributes. Or, it you do not need to handle the individual <student> tags as you read them, specify student => 'as array', or possibly student => 'by name', in the rules. And handle the array of students in $attr->{student} or access the individual students as $attr->{$name} (depends on the rule you specify for <student>) in the handler for <class>.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XML::Parser Tutorial
by Mike Blume (Initiate) on Aug 23, 2008 at 20:23 UTC | |
by Jenda (Abbot) on Aug 24, 2008 at 12:41 UTC |