in reply to Re^2: Any help available for a newbie to XML::LibXML?
in thread Any help available for a newbie to XML::LibXML?
The only thing that I see from looking at your code that might be responsible would be that
my($dev) = $devinfo->findnodes('./dev_name');
actually finds many nodes just to throw them all away except for the first. Maybe do it this way to check how many nodes you find:
my @found_devices = $devinfo->findnodes('./dev_name'); warn "Found " . scalar(@found_devices); my $dev = $found_devices[0];
But that's just a shot in the dark. Actually looking at your XML, it shouldn't find more than one device.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Any help available for a newbie to XML::LibXML?
by wardy3 (Scribe) on Mar 03, 2008 at 22:49 UTC |