Here you can find the source of getNodeMap(NamedNodeMap artifactAttributes)
static Map<String, String> getNodeMap(NamedNodeMap artifactAttributes)
//package com.java2s; /******************************************************************************* * Copyright (c) 2005-2012 eBay Inc./*from w ww . ja v a 2 s . co m*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ import java.util.HashMap; import java.util.Map; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { static Map<String, String> getNodeMap(NamedNodeMap artifactAttributes) { Map<String, String> attributeMap = new HashMap<String, String>(); if (artifactAttributes != null) { int attributeCount = artifactAttributes.getLength(); for (int idx = 0; idx < attributeCount; idx++) { Node attributeNode = artifactAttributes.item(idx); attributeMap.put(attributeNode.getNodeName(), attributeNode.getNodeValue()); } } return attributeMap; } }