public static Operation parseXSDFile(String fileName) {
		Operation operation = new Operation();
		Map<String, SimpleTypeRestriction> tipuriSimple = new HashMap<>();
		Map<String, ComplexTypeParameter> tipuriComplexe = new HashMap<>();
		XSOMParser parser = new XSOMParser();

		XSType type = null;
		XSContentType xsContentType = null;

		try {
			parser.parse(new File(fileName));
			XSSchemaSet sset = parser.getResult();

			XSSchema s = (XSSchema) sset.getSchema(1);

			// cauta definitii de tipuri complexe
			Iterator<XSComplexType> ztr = s.iterateComplexTypes();
			while (ztr.hasNext()) {
				XSComplexType e = (XSComplexType) ztr.next();
				ComplexTypeParameter ctp = getAttributesForComplex(e);
				ctp.setName(e.getName());
				tipuriComplexe.put(ctp.getName(), ctp);
			}

			// cauta tipuri simple
			Iterator<XSSimpleType> str = s.iterateSimpleTypes();
			while (str.hasNext()) {

				XSSimpleType e = (XSSimpleType) str.next();
				SimpleTypeRestriction simpleRestriction = new SimpleTypeRestriction();
				initRestrictions(e, simpleRestriction);
				registerType(tipuriSimple, e.getName(), simpleRestriction);
			}

			// cauta definitii de elemente - de fapt e unul singur - task
			Iterator<XSElementDecl> jtr = s.iterateElementDecls();
			while (jtr.hasNext()) {
				XSElementDecl e = (XSElementDecl) jtr.next();
				operation.setRootElement(e.getName());
				type = e.getType();
				xsContentType = type.asComplexType().getContentType();
				XSParticle xsParticle = xsContentType.asParticle();
				getOptionalElements(operation, tipuriComplexe, xsParticle);
			}

		} catch (SAXException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		operation.setName(tipuriSimple.get(operation.tagForExecName).pattern);
		operation
				.setDesc(tipuriSimple.get(operation.tagForExecDescription).pattern);
		if (tipuriSimple.get(operation.tagForExecType).pattern
				.equals("binarization")) {
			operation.setType(1);
		} else {
			operation.setType(0);
		}

		for (SimpleTypeParameter stp : operation.getParameters()) {

			if (!(stp instanceof ComplexTypeParameter)
					&& tipuriSimple.containsKey(stp.getBaseType())) {
				stp.setBaseType(tipuriSimple.get(stp.getBaseType()).baseType);
			}
		}

		return operation;
	}