diff --git a/rng2vim.pl b/rng2vim.pl index 41b7284..d6348d5 100755 --- a/rng2vim.pl +++ b/rng2vim.pl @@ -316,7 +316,7 @@ sub get_root_elements { my $document = shift || die 'Invalid number of arguments'; # Find the node with root element definitions: - my ($node) = $document->findnodes("/*[name()='grammar']/*[name()='start']"); + my ($node) = $document->findnodes("/*[name()='grammar']//*[name()='start']"); # Find supported root elements: my @elements = get_children($document, $node);