Well the first thing you can do is export your table in a simple XML format that maps the tables so clients can use it for whatever use, maybe feeding another DB, or filtering out some information, or adding some more, or presenting differently.

_you_ don't have to store the information in XML, but making it available in such a way makes it much more easy for others to re-use it. A time element is much easier to process than the second column of a table. Especially if (when) at some point in the future you change the structure of your table and you add an extra field in between the first 2. HTML processors will be all messed up while, if written properly XML clients will still work fine.

On the other hand of course you might not want clients to be able to re-create your data base and you might want to avoid exporting XML.

The nice thing about XML on the client side is that it is a slightly self-documented format, standard, stable, and that can be processed using a lot of different tools, form XSLT processors to Java libraries and to Perl modules.

And if you just _have_ to export XML because your boss told you so, then have a look at DBIx::XML_RDB which will do it painlessly and efficiently.


In reply to Re: Perl/XML/MySQL by mirod
in thread Perl/XML/MySQL by rbottoms

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.