Disclaimer: This is a conceptual question and so I'm posting here rather than stackoverflow or wordpress.stackexchange
Okay, so I need to import XML data into WordPress and parse it to populate a form created with the Gravity Forms plugin. A few notes:
- WP prohibits the uploading of XML files
- Only trusted users will have access to the page on which this functionality will live
- Data entry plugins are fair game to be apart of the process.
- I'm building this on the Divi theme
- The XML file in question will be ~4k lines
- This will rarely (if ever) be used from a mobile device
My current approach is this:
- Use a divi code block and some jQuery to harness the necessary input fields on a page. Like, a file picker, a drop-down or two to give the site some idea of which form it needs to format the data into (right now, it's just one, but more will come), and a button.
- The server would then handle the call, populate the form, and then notify the user on success/failure.
Create a plugin that creates a shortcode to inject the necessary file-upload field, type selectors, and button onto a page
Create a stand-alone application in some other language (I'd probably pick java) to convert the xml to a flat file (this would be my answer if I discovered client-side xml processing was a bad idea).
Question: Is this approach okay? Terrible? Please let me know what would be better. Remember, I'm not asking for code here. I simply feel like there's a few client-server concepts and best practices that I'm missing and would appreciate if someone would point me in the right direction.