Code example for Element

Methods: getTagName

0
	 *  
	 * @param xmlElement The DOM element to present 
	 */ 
	XMLElement(Element xmlElement) {
		dom = xmlElement;
		name = dom.getTagName();
	} 
	 
	/** 
	 * Get the names of the attributes specified on this element 
	 *  
	 * @return The names of the elements specified 
	 */ 
	public String[] getAttributeNames() {
		NamedNodeMap map = dom.getAttributes();
		String[] names = new String[map.getLength()];
		 
		for (int i=0;i<names.length;i++) {
			names[i] = map.item(i).getNodeName();
		}