Logo XPur - StAX XML parser for Groovy

Build Status

Minimalistic XML parser for huge XML files, written in Groovy

License: Apache v2

Usage:

Parse cars.xml - print id, make & model for each car:

Example.groovy
InputStream source = new FileInputStream("cars.xml")
XmlIterator cars = new XmlIterator(source, "car")
cars.each { car ->
	println "${car.id} ${car.make} ${car.model}"
}
OneLiner.groovy
new XmlIterator(source, "car").each {println "${it.make} ${it.model}"}
Gradle
implementation 'org.xpur:xpur:0.7'
Maven
<dependency>
    <groupId>org.xpur</groupId>
    <artifactId>xpur</artifactId>
    <version>0.7</version>
</dependency>