Import .XML files using .XSD files as schemas
Forums
Hi,
I've been trying to import a .XML file to IDEA using the import wizard tool, but I don't get the expected outcome, instead of 59 fields I get more than 300. The issue might be that IDEA is not taking into account the schema files when importing the .XML file.
Is there a way of import one XML file to IDEA and apply 5 different schemas (in 5 diferente .XSD files)?
Thanks in advance.
Hi Brian,
Hi Brian,
Thanks for your reply, although it isn't exactly what I'm looking for.
When we export a table from IDEA in a XML format, we get two files: the XML file and the XSD file. What I want to do is the other way around, I want to import a XML file and be able to import also the XSD (in order to validate the fields). Because it's possible to export XSD files, I believe that it's also possible to import them.
In this case I want to import a XML file and validate the fields (formats and inputs) through 5 different XSD files.
Hope this is clear.
Thanks in advance,
Ana
Hi Ana,
Hi Ana,
Thanks for the clarrification. What you will have to do is rename the XSD to XML and then you will be able to import it into IDEA using the XML import feature. It looks like IDEA only looks for XML file extenstions so that is why you will have to make the change.
Brian
Hi Brian,
Hi Brian,
Thanks for your quick reply.
I understand that I must convert the XSD file to XML in order to make the file readable by IDEA, but then after having imported both files, I will get 2 different tables in IDEA. How can I apply the validation of the XSD file to the XML file?
Could you please clarify the steps that I need to take in order to import the XML file and apply the validitions defined in the 5 XSD files?
Thanks a lot!
Ana
Hi arsmatilde,
Hi arsmatilde,
Yes, you should be able to do that. What you should probably do is select your file in the Import Assistant and click on the next. You then have a list of all the fields in the xml file, something like this:
You can select the fields you want to import. When you import the first time it will create the definition for future imports. You can also break it up into several layers if you want.
Hope this helps out a bit.
Brian