NAME

oEdtk::XPath - XML::XPath subclass returning plain string values

SYNOPSIS

use oEdtk::XPath;

my $xp = oEdtk::XPath->new(filename => 'doc.xml');
my $v  = $xp->findTextValue('/root/child');

DESCRIPTION

A minimal subclass of XML::XPath that adds a string-coercing lookup: it runs the usual findvalue and forces the result into a plain string, so a node value can be used directly as a scalar.

METHODS

findTextValue

my $value = $xp->findTextValue($path, $context);

Run findvalue for $path in $context and return its result as a plain string. The rest of the XML::XPath API (new, find, findnodes, ...) is inherited unchanged.

AUTHOR

The oEdtk team.