Subject | Re: [firebird-support] File XML |
---|---|
Author | Fidel Viegas |
Post date | 2008-10-23T20:36:22Z |
On Thu, Oct 23, 2008 at 5:58 PM, Vinicius <vinicius_pedrosa@...> wrote:
Why don't you do that on the client side?
But, let's say you have the following table structure:
create table person (
id bigint not null primary key,
name varchar(20),
surname varchar(40)
);
You could always do something like this:
select '<people>' from rdb$database;
select '<person><id>' || id || '</id><name>' || name ||
'</name><surname>' || surname || '</surname></person>' from person;
select '</people>' from rdb$database;
Another solution is to handle everything in a stored procedure.
I normally handle that on the client side. I get the records and
generate the xml on the client side.
Hope that was helpful.
All the best,
Fidel.
> I need to generate an XML file from an SQL query. how can I do?Hi Vinicius,
>
Why don't you do that on the client side?
But, let's say you have the following table structure:
create table person (
id bigint not null primary key,
name varchar(20),
surname varchar(40)
);
You could always do something like this:
select '<people>' from rdb$database;
select '<person><id>' || id || '</id><name>' || name ||
'</name><surname>' || surname || '</surname></person>' from person;
select '</people>' from rdb$database;
Another solution is to handle everything in a stored procedure.
I normally handle that on the client side. I get the records and
generate the xml on the client side.
Hope that was helpful.
All the best,
Fidel.