Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • Can you not use CDATA sections to encapsulate raw data within your XML?
    -Scott McWhirter- | -kungfuftr-
    "JAWK - Just Another Whiny Kid"
    • You could, but why? It makes sense if you want to embed data that XML is not good at encoding: audio, video, and other blobs. If you want to store simple, serialized data, and you're using XML for some of it, why not use it for the rest? XML parsers have been written already, and the good ones have been extensively refined and tested. The code here was using XML to store a bit of data that could've been XML. Instead, it used a different format that required a different parser. Then, that parser was cr
  • There's a relatively famous quote, attributed to Napoleon, that reads "If you say you're going to take Vienna, take Vienna."

    When I cycle to my fathers place, my route takes me through the Lobau and past a small memorial called "Napoleonstein" (or something). It marks the place where Napoleon stayed with his army during the Battle of Wagram [] (when he took Vienna). It is basically in the middle of nowhere, with lots of alluvial forest and mosquitos (in summer) around.

    All of which has nothing to do with Pe

  • I found myself putting CSV in XML recently. I'm not sure whether to blame the MS/.net programmer at the other end of the notwork connection, or the piece of shit that is SOAP::Lite, but it was pretty much the only way that we could pass an array of data as a reply to a SOAP query and have it work going both ways. But at least we used proper CSV, not just join(',',@data).
  • On the one hand, if you're using XML, you want to parse one syntax and be done. The reality is that's more fantasy than fact.

    The problem you're trying to solve here is colloquially known as "parsing the atom". That is, the XML tagging suffices to mark up the structure of some blob of data, but doesn't scale down to parse the data fragments inside that blob. For example, consider a nice XML document that has an attribute or a text block that contains a date. Is 'Tue Oct 19 12:19:16