On Nov 29, 2007 10:07 AM, James Fuller <[EMAIL PROTECTED]> wrote:
> Once again, the point is that I would like to manage and process XML
> using native types, structures and xml aware  operators, from within
> perl. If I inherit XPATH, then I get 90% of everything I need.

But what do you mean "native"?  I think you're misunderstanding the
whole "core" argument.  Assume that you install Perl 6, and it comes
with everything you need to do XML processing.  You have to add a
'use' statement at the top, but the module so used is preinstalled.
Having used it, operators work on XML objects: you can add a child
node with +, index a document tree with XPath expressions, etc.   What
more do you need?

The module could even, I suppose, insert a filter into the compiler so
that your proposed literal syntax would work, but I don't really see
the advantage of that over this:

my $doc = Document.new(<<END);
<some><content>here</content></some>
END

You mentioned regexes several times, but there's a difference.
Regular expressions are often quite short, to the point where the
syntax around creating them can overwhelm them (as anyone who's tried
to use them in Java or pre-regex-literal Javascript can attest).  XML
documents?  Not so much.  I don't see any advantage to adding support
for embedded XML to the core parser, which is complex enough as it is.
 XML + POD, anyone?

Reply via email to