private Analyzer getAnalyzer(final String file) {
		Document dom = null;
		DocumentBuilderFactory dbf = DocumentBuilderFactory.
				newInstance();
		dbf.setNamespaceAware(true);

		try {
			// Ia din factory o noua instanta de document builder.
			DocumentBuilder db = dbf.newDocumentBuilder();

			// Parseaza pentru a obtine o reprezentare DOM a fisierului.
			dom = db.parse(file);
		} catch (Exception e) {
			ErrorMessage.show("Exceptie la parsarea fisierelor XSD:"
					+ e.getMessage());
		}

		Map<String, String> dt = new TreeMap<String, String>();

		// Ia toate tagurile simpleType.
		Match simpleType = $(dom).namespace("xs"
				, "http://www.w3.org/2001/XMLSchema").xpath("//xs:simpleType");

		for (int i = 0; i < simpleType.size(); i++) {
			// Ia nume si valoare daca acestea exista.
			String name = simpleType.get(i).getAttribute("name");
			String value = $(simpleType.content(i)).namespace("xs"
					, "http://www.w3.org/2001/XMLSchema").xpath("//xs:pattern")
					.attr("value");

			// Verifica daca exista name si value.
			if (name != null && value != null) {
				dt.put(name, value);
			}
		}

		// Avem nevoie de un analizator de un anumit tip.
		if (dt.get("execType") != null
				&& dt.get("execType").compareTo(this.type) == 0) {
			return new Analyzer(dt.get("execName"),
					dt.get("execDescription"), this.type);
		}

		return null;
	}