Problem with XML Import

0
Hello Mendix Community, I am trying to upload XML file into my mendix application. I am following the instruction provided in the below web page. https://docs.mendix.com/howto/integration/importing-xml-documents However, I am not able to upload the XML file. System should initiate the upload once click on the microflow but ‘No selection available’ appears on the screen. I am not sure what else should I do. Is there any other method to upload XML files in Mendix app? Thanks a lot. Best Regards, Puneet Solanki
asked
1 answers
2

Puneet,

On the page below, click the highlighted button.  This should display a page that enables you to select a file from your computer.  Then when you click Save, that page will be uploaded into Mendix.

Next, select the row in the Datagrid that shows you file (so that the file is selected) and then click the Import XML File button you created.  This will pass the selected row (which has the file contents) into your microflow.

Hope that helps,

Mike

***EDIT***

Puneet – I did a quick example and got this working.  Here’s what I did:

Created an XSD file from your XML file below.  The XSD looks like this:

Saved the XML from your comment below into a file that looks like this:

In the Modeler, created an XML Schema that looks like this

In the Modeler, created an XML Import Mapping that looks like this:

The domain model looks like this:  (btw, I made the entities persistable because I am lazy)

Created a microflow to import the file:

Made a small page with Files on the top and Customers on the bottom:

The microflow is behind the Import button.  

Finally, I got this result:

Hope that helps.

 

answered