The XML file must be well-formed, otherwise, when you try to create the schema, you will receive an error message and the schema will not be created. For an XML file to be well-formed, it has to follow certain specifications set out in the XML 1.0 recommendation.
The following instructions were written for the Resource perspective, but they will also work in many other perspectives.
To create an XML schema from an XML file, follow these steps:
The schema opens automatically in the XML schema editor. It will contain all the elements that were in the XML file you used to create the schema. You can now customize it further, adding new elements and so on.