i need to create xml by using xml function in postgresql.
i can create following xml by using this query Query: SELECT XMLELEMENT(name chapter, XMLATTRIBUTES( '1' AS number, CURRENT_DATE as current_date), XMLELEMENT(name document, XMLATTRIBUTES((select typeaccountcode from typeaccount limit 1) AS doc_name)));