Java 操作XML (Stax JDK6引入)
package hello; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLEventReader; import javax.xml.stream.events.Attribute; import javax.xml.stream.events.EndElement; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.Iterator; import java.util.jar.Attributes; public class XML_STAXReader { public static void main(String[] args) { //