XML::Rabbit::Trait::XPathObject - XML DOM object xpath extractor trait
package MyXMLSyntaxNode; use Moose; with 'XML::Rabbit::Node'; has 'first_person' => ( isa => 'MyXMLSyntax::Person', traits => [qw(XPathObject)], xpath_query => './person', ); no Moose; __PACKAGE__->meta->make_immutable(); 1;
This module provides the extraction of complex values (subtrees) from an XML node based on an XPath query. The subtree is used as input for the constructor of the class specified in the isa attribute.
See XML::Rabbit for a more complete example.
Specifies the prefix:tag to class name mapping used with union xpath queries. See XML::Rabbit for more detailed information.
Returns a coderef that is run to build the default value of the parent attribute. Read Only.
Robin Smidsrød <firstname.lastname@example.org>
This software is copyright (c) 2015 by Robin Smidsrød.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.