Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • A friend and I had a similar discussion about generating XML in a simple way today -- we trawled CPAN and found XML::Generator [cpan.org]. Does it do (most of) what you're looking for?

    • I had looked at XML::Generator and I liked it, but it had some problems. First, because of autoload, it's easy to do this:

      print $xml->feild('foobared');

      I probably meant "field". My version forces you to map methods to tags and will die if you try to print a tag that doesn't exist (though you can add methods/tags on the fly).

      Also, as far as I can tell, I would not be able to conveniently dump out data in the Yahoo! IDIF format. Here's an snippet:

      <?xml version="1.0"?>
      <IDIF>
       

      • This is not XML, so really it should not be labelled as such. AFAICT it is pretty close to being SGML though. It might even be SGML, the XML declaration would be seen by an SGML parser as a regular PI, you can add a DTD when you parse the file, and unenclosed tags and &\W are valid in SGML. You just need the characters to be in latin1.

        So why don't you go and pollute the SGML namespace ;--)

        Seriously, I don't think you should release your module in the XML namespace. An IDIF module would be OK, it its o

        --
        mirod
        • I have decided not to put this in the XML namespace. That much I agree on.

          I think my main problem with your module is the way you seem to advertise it, which sounds a bit like "let's generate more quasi XML to p.o. real XML guys" to me.

          I can see how that might appear to be what I was doing. I'll be sure to clarify that. Unfortunately, this is a real problem space that developers constantly face: legacy XML "variants" or third-party resources which require malformed XML. Since it's not always possib