[Purdue-pm] XML + Perl

Bradley Andersen bradley.d.andersen at gmail.com
Thu Feb 2 09:26:35 PST 2012

well if i were in charge of this little data xfer, i would certainly
have taken my usual route:
  mysqldump -u -p dbname > dbname.`date +%s`.sql
then a quickie
  mysql -u -p dbname < dbname.datefromabove.sql
works really well.

unfortunately, i am not privy to why they output it this way and it
seems prohibitively difficult (at least) to recreate the queries and
do it the "right" way.

as for the responses from this list, i'm happy anyone responded at
all.  i was thinking maybe i had a gaping hole in my understanding,
but it turns out i do not, which is a nice validation :)

surely a perl module needs to be written that does not keel over and
die to meet the standard.  there could be a flag that says, "hey
XML::Parser, if you want to die, don't just output the $@ to a file,

i am actually surprised that this does not seem to already exist.

On Thu, Feb 2, 2012 at 12:21 PM, Dave Jacoby <jacoby at purdue.edu> wrote:
> On 2/2/2012 11:32 AM, Bradley Andersen wrote:
>> Here's the background:
>> Some guy who used to work where I work executed some queries and for
>> some reason dumped the results to XML.  Now the DB is not accessible
>> and Some guy is not accessible, and the task for me is to try and get
>> the data back from this XML.
>> It's convoluted and should not have occurred in the first place:(
> It happens. We had a power outage yesterday. Instrument had a UPS, but the
> computer controlling it didn't, so, practically, the instrument did not have
> a UPS. And we had one floating around, unused. Should not have been like
> that, but I didn't think.
> By spec, XML is supposed to be well-formed, so it is brittle by design. I'd
> think about writing try and catch into something, but from what little I've
> done with XML::Parser, I'd think it was an all-or-nothing thing.
> MySQL exports as SQL, so the restore looks like mysql < backup.sql. I hope
> you can set the new backup scheme into something equally sane.
> And I'm sure this has been nearly useless too you. Sorry, and good luck.
> --
> Dave Jacoby                         Address: WSLR S049
> Code Maker                          Mail:    jacoby at purdue.edu
> Purdue University                   Phone:   765.49.67368
>   795 days until the end of XP support

More information about the Purdue-pm mailing list