Java tutorial
//package com.java2s; import javax.xml.namespace.QName; import javax.xml.stream.events.XMLEvent; public class Main { public static String attribute(XMLEvent e, String name) { return e.asStartElement().getAttributeByName(new QName(name)).getValue(); } }