if (1) { my $tw = XML::Twig->new(%xmlopt); $tw->parse($doc); for my $la ($tw->findnodes("//la")) { my $t = $la->text; my $ta = $la->next_sibling_text; print "Found an la element. Its text is ((($t))). The text immediately after is (($ta))).\n"; } }