In my Postgresql table, there is a column has the type of xml and I would like to persist the whole XML document there.
In Servoy app, I can read the content of XML document via a plugins plugins.XmlReader.readXmlDocumentFromFile. The returned value is an array of XmlNode.
At my first try, I simply assign the returned value to the column of the table via the foundset.
- Code: Select all
var xmlsFS = datasources.db.mydatabase.my_table.getFoundSet();
xmlsFS.newRecord();
xmlsFS.xml_content = xmlNodes[0];
databaseManager.saveData(xmlsFS);
It throws an error
ERROR com.servoy.j2db.util.Debug - Couldn't convert: Node[name:catalog, type: ELEMENT] to media data
How can I overcome this issue?
Thanks