Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/XML
t
.travis.yml
LICENSE
META6.json
README.md
appveyor.yml

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.

You can’t perform that action at this time.