in reply to Re^2: xQuery functionality in Perl?
in thread xQuery functionality in Perl?
Sure, my example is easily done using XML::LibXML, but it'd take a lot more code. This is similar to the fact that regular expressions in other languages are generally implemented as add-in libraries, and have the same capabilites as perl's regexes, but are a lot more cumbersome to use.
Also, if this were implemented as a native type, I have a gut feeling that it'd fit naturally into other expressions in a way that would be unnatural or impossible with the library approach.
For example, 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. This is something that you just can't do with XML::LibXML without going through a complete deparse/reparse cycle, and the maintainer of XML::LibXML is pretty adamant about keeping it that way.
There would probably also be more natural fits with existing perl keywords, like grep/map/sort/foreach, which are cumbersome when you need to use a libraries methods to work with xml.
That's my hope, at least.
Doug.
PS: yeah, I thought qx was already in use, but you get the idea
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: xQuery functionality in Perl?
by jdporter (Paladin) on May 19, 2005 at 18:38 UTC |