Dear Supportteam
Is there already a sample how to parse/import an xml-file ?
There is already io.jmix.flowui.sys.ViewXmlParser
Regards
Felix
Dear Supportteam
Is there already a sample how to parse/import an xml-file ?
There is already io.jmix.flowui.sys.ViewXmlParser
Regards
Felix
Hi,
Could you describe your task in more detail?
Regard,
Gleb
Hi Gleb
Import an xml-file (Camt) with bankdata to add payments in a table of a Jmix application.
Regards
Felix
The workflow could be the following:
upload
componentString
e.g. by converting InputStream
to string: IOUtils.toString(stream, StandardCharsets.UTF_8)
(see io.jmix.flowui.sys.ViewXmlLoader#loadTemplate
)String
content to org.dom4j.Document
using io.jmix.core.common.util.Dom4j#readDocument(java.lang.String)
org.dom4j.Element
s according to the document structure by reading nested elements and their attributes. Use any of the component loaders as an example and io.jmix.flowui.xml.layout.support.LoaderSupport
to facilitate parsing data from XML.