I have an PostgreSQL Function which returns me an XML where the whole infos of my table are.
This is my function:
/* get all cat names */
create function cat_names() returns xml as $$
select to_xml('select name FROM cat_Infos;');
$$ language sql;
to get the results I do the following:
ResultSet rs = sql.executeQuery("select cat_names()");
while (rs.next()) {
// This is where I actually thought that I could pass the XML I get, to my DOMParser.
// I thought about something like this:
DOMParser dom = new DOMParser();
dom.setImputString(//Xml I get from the resultset)
}
The problem is, I actually have no idea how to get the Xml from the ResultSet.
You should be able to use
to get the XML String