my $doc = XML::LibXML->load_xml( ... ); foreach my $parent ($doc->findnodes('//Parent')) { my @childElements = $parent->findnodes('*'); # ...do stuff with @childElements... }