>Hello Gregory
>
>Thanks for your reply, but you know i am new to use this kind of code to poduce XML.
>
>the fields linediscount and linetax are alias for the same table FI (lines of invoice)
>
>Also, i need to use SET RELATION to join the 3 cursors to create parent, chield 1 and chield 2. The primary key for the table header FT is ftstamp, that is also save on each line for the same invoice.
>My actual code is:
>
>Select ft.ftstamp,fdata, fno,no, nome, morada,local,codpost from ft order by ft.fno into cursor Documento where ft.fno = 121005551
>
>Select fi.fistamp,fi.ftstamp, fno,ref,design,qtt, epv,etiliquido,usr4 AS 'Codpautal',codigo from fi order by fi.fno into cursor Linhas where fi.fno = 121005551
>index on ftstamp tag ftstamp
>
>Select fi.fistamp ,fi.ftstamp, fi.desconto from fi order by fi.fno into cursor LinhasDesconto where fi.fno = 121005551
>index on fistamp tag fistamp
>brow
>
>SELECT Documento
>SET RELATION TO ftstamp INTO Linhas ADDITIVE
>
>SELECT Linhas
>SET RELATION TO fistamp INTO linhasDesconto ADDITIVE
>
>what i need to do, for each cursor is to passed for my XML only some fields, for example :
>for DOCUMENT fields: fdata,fno,no, nome,morada local codpost
>for Linhas fields: ref, design, qtt, epv etiliquidoCodpautal, codigo
>for LinhasDesconto fields : desconto
>
>I dont know how can do that, because all the fields for each cursor appear on my XML file.
>
>I think that is because i use fi.ftstamp and fi.fistamp on SET TELATION to create come kind of join.
>
>Please can you help me about this question.
>
>Many thanks again Gregory
>
>Best regards
>Luis Santos
Luis,
I don't know whether I can be of much help
What I need from you is
(1) The schema (you can attach it to the message)
(2) table layout and sample ( Only the fields necessary to create the cursors DOCUMENT , Linhas and linhasDesconto )
(3) Example of output required
Bear in mind that XmlAdapter is very basic (limited). It may not be possible at all to use it
Gregory