private static void parseByStreamReader(XMLInputFactory xis,
			InputStream inputStream) {
		XMLStreamReader reader = null;
		try {
			String preflag = null;
			reader = xis.createXMLStreamReader(inputStream);
			while (reader.hasNext()) {
				int type = reader.next();
				switch (type) {
				case XMLStreamConstants.START_ELEMENT:
					if (preflag != null) {
						System.out.println();
					}
					System.out.print(String.format("<%s>", reader.getName()));
					preflag = reader.getName().toString();
					break;
				case XMLStreamConstants.CHARACTERS:
					if ("".equals(reader.getText().trim())) {
						break;
					}
					System.out.print(reader.getText());
					break;
				case XMLStreamConstants.END_ELEMENT:
					System.out.println(String.format("</%s>", reader.getName()));
					preflag = null;
					break;
				default:
					break;
				}
			}
		} catch (XMLStreamException e) {
			e.printStackTrace();
		} finally {
			try {
				if (reader != null) {
					reader.close();
				}
			} catch (XMLStreamException e) {
				e.printStackTrace();
			}
		}
	}