Skip to main content

Import different XML files via script

Hi,
We have to import many XML files via IDEA script. The problem is that using macros we have to have a XRDF file which does not exist and is usually created by the import dialog.
Is there a way to automatically create the XRDF file so we can use the XML import in a macro?
Cheers
Peter

Lois Thu, 05/24/2018 - 07:25

Hi Peter,
I haven't tried it on xml but it could work. Import a first time and have the XRDF file generated and then use this for subsequent imports. This is assuming that the XML file would have the same format as the subsequent files to be imported.

Brian Element Thu, 05/24/2018 - 13:18

HI Peter,

I am on the road right now but I think there is a way to do this.  Let me get back to you.

Brian

Brian Element Sun, 05/27/2018 - 18:48

Hi Peter, 

I just did some testing and you don't actually need a XRDF (at least for my test files).  I have attached a script that you can try out.  Just select the folder with the files and it will import all the xml files from that folder.

Brian