Christian Renz wrote:
of crap known as XSL. An XML-based derivative that performs XML transformations, allowing/using embedded P6 regexs, closures, etc., and able to more easily translate XML <==> P6 data.

I'm still quite XML-phobic, but I see the need for strong XML support in Perl 6. However, I'd like to work with XML in Perl 6 in a way that I don't even notice it's XML. Would it be possible to come up with an interface to XML that is at least as intuitive as tie is for hash<->DBM file? And that can cope with megabyte-sized XML files?

It depends what you mean by all that. In some sense it already exists, there's nothing keeping someone from providing you a tied interface to XML::Simple, or some such other module.


If you want more there are all sorts of existing solutions. XML::Twig is one, and probably the only one that will fulfill all your requirements (ease of use of an in-memory structure resilient to large documents -- XML took deliberate design decisions that make that difficult if not impossible ).

Barrie Slaymaker has also created tools such as XML::Essex that make XML processing much more perlish (or in fact, simply more adapted to programming in general).

There are also budding cross-language projects such as XBind that use a simple definition of how to map a given vocabulary to programming structures. I'm betting those will go a long way making things easier.

In fact, if we're talking about data storage only, it would be
interesting to have such a tie that allows me to store my data in an
XML file, YAML file, SQL database etc.

That already exists or is very easily doable, so long as you don't care too much what the XML looks like.


My point is: Perl 5 already makes XML processing significantly easier than in other languages, the only competitor I'm aware of being Python. I see *much* in Perl 6 already that will make it easier still, but a large part of the frustrations programmers experience have nothing or little to do with what programing language they use (do long as it's dynamic). They're problems that need to be solved through new interesting ways of processing XML. I agree with Simon that there is very likely nothing that Perl 6, at the language level, can do to provide a solution to these issues. If this list were to find a solution, it would have nothing that would be Perl 6 specific.

There's a friendly perl-xml list to expose issues and solutions you may have.

--
Robin Berjon <[EMAIL PROTECTED]>
Research Engineer, Expway        http://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488



Reply via email to