Perl LibXML get last line number of Node
问题 I use LibXML in Perl, which store the start line number of each node, but how i can get the last one? I tried get last line number through.. ..counting newlines in innerhtml of the node, but LibXML return the innerhtml in different formatting than original, so that the line number differ. ..node->getLastChild->line_number, but also havin no success. Any Idea? 回答1: If line_number returned the first line of a node as you say, all you'd need is my $s_line_num = $node->line_number(); my $e_line