public Map<String, String> toMap() {
		Element root = doc.getDocumentElement();
		Map<String, String> params = new HashMap<String, String>();

		// 将节点封装成map形式
		NodeList list = root.getChildNodes();
		for (int i = 0; i < list.getLength(); i++) {
			Node node = list.item(i);
			params.put(node.getNodeName(), node.getTextContent());
		}
		// 含有空白符会生成一个#text参数
		params.remove("#text");
		return params;
	}
public Map < String , String > toMap ( ) { Element root = doc . getDocumentElement ( ) ; Map < String , String > params = new HashMap < String , String > ( ) ; NodeList list = root . getChildNodes ( ) ; for ( int i = 0 ; i < list . getLength ( ) ; i ++ ) { Node node = list . item ( i ) ; params . put ( node . getNodeName ( ) , node . getTextContent ( ) ) ; } params . remove ( "#text" ) ; return params ; }
针对没有嵌套节点的简单处理

@return map集合