foreach my $title ($doc->findnodes('/library/book/title')) { print $title->to_literal, "\n" }