Reputation: 1
I want to generate structured xml from result of select query. I tried with FOR XML but its not working . How i should achieve this
Upvotes: 0
Views: 561
Reputation: 11657
If we are using sqlite3 command line tool, we can choose from the following output modes (from the .help command):
.mode MODE ?TABLE? Set output mode where MODE is one of:
csv Comma-separated values
column Left-aligned columns. (See .width)
html HTML <table> code
insert SQL insert statements for TABLE
line One value per line
list Values delimited by .separator string
tabs Tab-separated values
tcl TCL list elements
There is a HTML mode, but currently no XML mode.
Upvotes: 0
Reputation: 180192
SQLite does not have XML formatting functions. You have to do this in your code.
Upvotes: 1