src/main/java/de/alpharogroup/xml/to/xsd/XmlToXsdExtensions.java
public static String xmlToXsd(final File xmlFile, final Inst2XsdOptions inst2XsdOptions,
		final XmlOptions xmlOptions) throws XmlException, IOException
	{
		final XmlObject[] xmlInstances = new XmlObject[1];
		xmlInstances[0] = XmlObject.Factory.parse(xmlFile);
		final SchemaDocument[] schemaDocs = Inst2Xsd.inst2xsd(xmlInstances, inst2XsdOptions);
		final SchemaDocument schema = schemaDocs[0];
		return schema.xmlText(xmlOptions);
	}
public static String xmlToXsd(final File xmlFile, final Inst2XsdOptions inst2XsdOptions,
		final XmlOptions xmlOptions) throws XmlException, IOException
	{
		final XmlObject[] xmlInstances = new XmlObject[1];
		xmlInstances[0] = XmlObject.Factory.parse(xmlFile);
		final SchemaDocument[] schemaDocs = Inst2Xsd.inst2xsd(xmlInstances, inst2XsdOptions);
		final SchemaDocument schema = schemaDocs[0];
		return schema.xmlText(xmlOptions);
	}
Returns a xsd String from the given XML file that can used for several purposes.

@param xmlFile
the xml file
@param inst2XsdOptions
the inst2 xsd options
@param xmlOptions
the xml options
@return the resulted xsd String
@throws XmlException
occurs when a give xml file is invalid.
@throws IOException
Signals that an I/O exception has occurred.