This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sat Jul 25 07:20:32 -0700 2009 | |
| |
.perlcriticrc | Fri Jul 03 03:59:48 -0700 2009 | |
| |
.todo | Mon Jul 13 13:39:27 -0700 2009 | |
| |
Changes | ||
| |
CuteQueries.pm | Fri Dec 18 05:12:10 -0800 2009 | |
| |
CuteQueries/ | Sun Jul 05 14:53:12 -0700 2009 | |
| |
MANIFEST | Fri Dec 18 05:12:36 -0800 2009 | |
| |
MANIFEST.SKIP | Mon Jul 06 15:12:48 -0700 2009 | |
| |
Makefile.PL | Wed Oct 21 03:52:43 -0700 2009 | |
| |
README | Tue Jul 07 12:10:14 -0700 2009 | |
| |
bad.xml | Wed Jul 29 04:06:37 -0700 2009 | |
| |
contrib/ | Wed Jul 29 03:56:47 -0700 2009 | |
| |
ddo.xml | ||
| |
example.xml | Sun Jul 05 05:33:21 -0700 2009 | |
| |
example2.xml | Mon Jul 13 13:39:25 -0700 2009 | |
| |
example3.xml | Sat Jul 25 07:36:26 -0700 2009 | |
| |
example4.xml | Mon Jul 27 05:35:27 -0700 2009 | |
| |
lib/ | Wed Jul 29 03:56:47 -0700 2009 | |
| |
t/ |
README
# This module produces results rather like L<XML::Simple>, but
# without the ambiguity problems inherent in going from XML to
# Perl.
use strict;
use warnings;
use XML::CuteQueries;
my $CQ = XML::CuteQueries->new;
$CQ->parse(<<"EOXML");
<root>
<result>OK</result>
<data>
<row><f1> 7</f1><f2>11</f2><f3>13</f3></row>
<row><f1>17</f1><f2>19</f2><f3>23</f3></row>
<row><f1>29</f1><f2>31</f2><f3>37</f3></row>
</data>
</root>
EOXML
my $arrayref_of_hashrefs = $CQ->cute_query(
# the top level query is for the <data> elements
# the shape of the only top level query is [],
# so it returns one [] -- for the one <data> element
"data" => [
# the contents of the top level [] is a sub query for row elements.
# Each row element should be a hashref, so the data-[] will contain
# three row-{} hashrefs
row => {
# the contents of those hashrefs is a subquery for any tag found
# there. The tag names are preserved as keys because we're
# sitting in the context of a hashref.
# the shape of each match result is '', so it just returns the
# contents of each tag as a string.
'*' => '',
}
],
);
# [ {f1=> 7, f2=>11, f3=>13},
# {f1=>17, f2=>19, f3=>23},
# {f1=>29, f2=>31, f3=>37}, ]








