in reply to Re^3: xQuery functionality in Perl?
in thread xQuery functionality in Perl?
I'd bet Storable would be able to persist an xmlnode scalar to disk, and read it back in, in a way that looks just like persisting any other datatype.Storable does a fine job with complex data structures, including objects.
...just can't do [it] with XML::LibXML without going through a complete deparse/reparse cycle...I don't believe that's avoidable.
...it'd take a lot more code...I still don't buy it. Witness:
Why is that so bad?my $xml_fragment = XML::Struct->new( <<EOF ); # fictitious... <records> <record id="001">foo</record> <record id="002">bar</record> </records> EOF my @nodeset = $xml_fragment->xQuery( "//records[@id = '001']" ); die "ids should be unique!\n" if @nodeset > 1;
In general, any suggestion that the core language should be changed to accomodate a specific domain or technology should be held at arm's length.
|
|---|