README

XML::Rabbit

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.

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.