If I replace name=... with foo=... in the XML, those go away and all
your eth interfaces come back. So it looks like there may be
something special with the "name" attribute of XML objects. What's
strange is that it seems to only happen when two children have the
same "name" XML attribute. We have quite a lot of same "name"
attributes, but not always in sibling XML objects.

I am trying to find out whether we misrespect the XML specs, but I
couldn't so far. Maybe it's a XML::Simple problem? libxml2 and
xmllint never complained like this.

Brice

Le 19/11/2012 19:01, Jeff Squyres a écrit :

Odd. On the SVN trunk, I'm running this code:
-----
open (LSTOPO, "lstopo -.xml|") || die "Can't open lstopo";
my $lstopo;
while (<LSTOPO>) {
$lstopo .= $_;
print "Read: $_";
}
close(LSTOPO);
my $xml;
$xml = XMLin($lstopo);
print Dumper($xml);
-----
In looking at the output, I see that lstopo's XML output includes all PCI devices, but when I look at the Dumper output of the parsed XML, some PCI devices are not listed. In particular: both eth4 and eth5 are included in the "lstopo -.xml" output, but eth4 is not included in the Dumper output.
The same thing happens if I "lstopo foo.xml" and then "XMLin("foo.xml")". So it's not a problem with perl reading from lstopo's stdout.
I've attached foo.xml -- any ideas why this is happening?