cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: Generate multi-level XML document using standard SQL select statement
Date Mon, 13 May 2002 07:35:45 GMT
On 12.May.2002 -- 10:17 AM, Evan Sho wrote:
> Just tried MS SQL server 2000. I can type in browser:
> http://localhost/mydb?sql=select * from dept, emp
> where for xml auto&root=List
> then, I will get XML:
> <List>
>   <dept id='10' name='Sales'>
>     <emp id='10' name='King' salary='5000'/>
>     <emp id='20' name='John' salary='200'/>
>   </dept>
>   <dept id='20' name='Account'>
>     <emp id='30' name='Peter' salary='2000'/>
>   </dept>
>   ...
> </List>
> The nesting of joined result is automatic, and I found
> that it is very useful. so is there any similar tool
> that can be used to get similar result?

Have a look at <esql:group/>. It's not automatic as such but obtaining
a result like the above would be easy. Alas, the query needs to be
known beforehand.

An automatic tools would need to have more knowledge about database
metadata and parse the query.



C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message