No description, website, or topics provided.
Perl6
Latest commit b6d5eea Mar 12, 2017 @ufobat Added Tags
Permalink
Failed to load latest commit information.
lib/XML added xpath-object support Feb 28, 2017
t added test-meta.t Mar 3, 2017
.travis.yml fixes for travis Mar 3, 2017
LICENSE added meta files Mar 3, 2017
META6.json Added Tags Mar 12, 2017
README.md fixes for travis Mar 3, 2017

README.md

XML::Rabbit

Build Status

A Perl 6 Library for building Attribues from XML files with xpath Expressions.

XPath Specification

Specification on XPath Expressions can be found at https://www.w3.org/TR/xpath/.

Synopsis

use XML::Rabbit;

class MyClass does XML::Rabbit::Node {
    has $.x is xpath-object('MyOtherClass, '/xml/b/@key' => '/xml/b');
}

class MyOtherClass does XML::Rabbit::Node {
    has $.value is xpath('.');
    has $.key is xpath('./@key');
}

my $object = MyClass.new(file => '/path/to/file.xml');

Example

If you want to see more examples please have a look at the testcases.

Documentation

This is my attempt to bring the ideas of perl5 XML::Rabbit into perl6. Thanks to AttrX::Lazy where I got the blueprint how to do the Meta programming.

License

Artistic License 2.0.