Autoparse XML is a java library built specifically for Android that uses code generation to parse XML into custom objects in your project.
Learn how to use Autoparse XML in the wiki!
Add the following lines to your build.gradle
file, replacing $autoparse_xml_version
with latest version from Maven Central.
repositories {
mavenCentral()
}
dependencies {
compile "com.workday:autoparse-xml:$autoparse_xml_version"
compile "com.workday:autoparse-xml-processor:$autoparse_xml_version"
}
Note that if you use the android-apt plugin or the kotlin-android plugin, you may use apt
or kapt
respectively instead of compile
for autoparse-xml-processor
, e.g.
apt "com.workday:autoparse-xml-processor:$autoparse_xml_version"
In fact, it is highly recommended that you use apt
or kapt
as this will get rid of some "invalid package" and related warnings.