Richard Lee wrote:
Chas. Owens wrote:
my $sabal = new XML::Twig(
twig_roots => {
'foo/yahoo' =>
#'[EMAIL PROTECTED]"kingtony"]' =>
sub {
my ($yabal, $element ) = @_;
if (
$element->first_child('bayking_list')->first_child('bayking')->att('id')
eq 'kingtony' ) {
$element->print;
}
}
}
);
I think I made a mistake .. this is now working...
<yahoo
V="baz"><bay_id><value>1000</value><fact>yes</fact></bay_id><bay_seen><value>50</value><fact>no</fact></bay_seen><bay_overall
value="disabled"/><bayking_list><bayking active="true" country="Russia"
id="kingtony"><bayking type="dictator"/><bay_usage
value="none"/><bayking_origin><bayking_origin_name emmigrate="no"
value="ohio_usa"><economy_status_previous value="very
poor"/></bayking_origin_name></bayking_origin></bayking></bayking_list><bayqueen_list><bayqueen
active="true" country="japan" id="queensarah"><bayqueen
type="dictator"/><bay_usage
value="none"/><bayqueen_origin><bayqueen_origin_name emmigrate="no"
value="ca_usa"/><economy_status_previous value="very poor"/><previous
marriage="no"/></bayqueen_origin></bayqueen></bayqueen_list></yahoo>
Now, I just need good way to put this into hash of hash referernce.....
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/