private Document initDocument(String responseContent, Document document, boolean namespaceAware) {
		if(document == null) {
			try {
				final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
				factory.setNamespaceAware(namespaceAware);
				final DocumentBuilder builder = factory.newDocumentBuilder();
				document = builder.parse(new ByteArrayInputStream(responseContent.getBytes("UTF8")));
			} catch (UnsupportedEncodingException e) {
				throw new AzotException(e);
			} catch (ParserConfigurationException e) {
				throw new AzotException(e);
			} catch (SAXException e) {
				throw new AzotException(e);
			} catch (IOException e) {
				throw new AzotException(e);
			}
		}
		return document;
	}