I am new to the XML. Having a database in postgres, I would like to represent the data in XML format. How may i do that please?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will have to use some form of application to read the data then parse it to the desired XML format. Here is an example of how to do it in PHP.
EDIT:
You can also use one of these functions
table_to_xml,table_to_schemaandtable_to_xmlschema, etc. See the documentation.Also have a look at this
A simple usage would be as follows:
SELECT table_to_xml('emp', TRUE, TRUE, '')results