[sf-perl] Some well-formed XML?

David Fetter david at fetter.org
Tue Sep 20 13:32:47 PDT 2005

On Tue, Sep 20, 2005 at 01:22:33PM -0700, Joseph Brenner wrote:
> Rich Morin <rdm at cfcl.com> wrote:
> >      So, it's fairly straightforward to serialize a set of RDBMS
> >      tables as XML and load them back into another database.  The
> >      rules for the (de-)serialization, however, will probably be
> >      hard-coded into your dumping and loading code.
> Funny, I was just in the process of doing just this sort of thing.
> In particular I'm noodling around how to preserve NULLs. 

One thing I've done is an is_null boolean attribute that can only be
true for things that contain an empty string.

> This is one of those things that I know has been solved a million
> times, but I doubt I'm going to want to bug Ops to install some CPAN
> modules to do it.
> (By the way, has anyone noticed that XML::Simple can't always read
> in the files that it writes?  Fun.)

I've noticed that as a rule, Java, C and C++ libraries appear to
handle XML a lot better than Perl does.  Maybe I've just been using
the wrong libraries...

David Fetter david at fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

More information about the SanFrancisco-pm mailing list