in reply to DBMS<=>XML

Just wondering, why is <resultset><row/></resultset> no good? It seems to me that if all the client is expecting is simple tabular data (say, to be displayed to the end user as a simple table) then that ought to be good enough. Or at least, that's what I thought when I did something very similar at work recently (sadly not in Perl).

I guess the thing is that if your client expects back highly structured data with specific meanings it's a different matter. I'm not too familiar with modules for this, but it seems like one good way might be to just store your XML templates somewhere (if they'll be fairly static), and use some kind of table to map the results from your query to individual locations (defined using XPath perhaps) in your XML template. I believe you could use XSLT for that too though I haven't tried.

Replies are listed 'Best First'.
Re: Re: DBMS<=>XML
by rvosa (Curate) on May 05, 2004 at 07:35 UTC
    I guess the thing is that if your client expects back highly structured data with specific meanings it's a different matter.

    That's exactly the problem. Here's the dilemma: I could restrict the types of queries you can do to a subset where the results are neatly marked up (using a template) to get the data in a form that's more complex than <resultset><row/></resultset> but then I'm constrained in terms of the things you can ask, or I can allow for more flexibility in terms of the queries but then I can't really see how I could get output that is not as generic.