Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML

by aulusoy (Scribe)
on Jul 01, 2008 at 06:45 UTC ( [id://694886]=note: print w/replies, xml ) Need Help??


in reply to Re^3: RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML
in thread RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML

So, if what you say is correct, that is, people are interested or at least know about other technology as well, then I was not that wrong assuming that they might also know about Castor. In that case one wonders why yourself know nothing about it, although it has been around for some time now and is quite popular for dealing with XML in Java.

Why the comparison with XML::Simple? The answer is simple. Despite its many limitations and shortcomings, I have always liked the philosophy of XML::Simple, that is, representing XML data as native Perl data. Most of the other XML modules (XML::Writer, XML::Twig, ...) don't do that. Although they may have other merits, you need to know that you are working with XML when you access XML.

So, I have compared to the module which I believe has got the idea right in the first place. It's true that XML::Simple has got quite a few limitations. But many of those limitations are actually overcome with XML::Pastor. So, I see no reason for not using it for some heavy duty XML work (apart from the fact that the code is not that mature yet). By the way, the only area where XML::Pastor is weak compared to XML::Twig is when working with huge XML documents and mixed content. You need to revert to Twig or SAX when you are working on huge documents. Otherwise, you can do pretty much everyhting. There is even some basic namespace support.

Coming back to the discussion about 'revolution'. It's true => code generation is not a new concept. Furthermore, XML is not new, XSD is not new, Perl is not new. However, "Dealing with XML in Perl via code generation from XSD" is a completely new way of doing things.

  • Comment on Re^4: RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML

Replies are listed 'Best First'.
Re^5: RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML
by Jenda (Abbot) on Jul 01, 2008 at 10:15 UTC

    XML::Pastor: "Dealing with XML in Perl via code generation from XSD"

    XML::Compile: "Where other Perl modules (like SOAP::WSDL) help you using these schemas (often with a lot of run-time XPath searches), XML::Compile takes a different approach: instead of run-time processing of the specification, it will first compile the expected structure into a pure Perl CODE reference, and then use that to process the data as often as needed."

    Looks to me like there are some similarities. While XML::Pastor seems to generate a set of classes that you can then use to build up or modify the XML, XML::Compile just generates some code that transforms between XML and Perl datastructure. I think both make a lot of sense. And both are good tools to keep in the toolbox. I don't think it's wise to restrict oneself to just one XML processing module.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://694886]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2025-05-21 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.