Open d-j-kendall opened 4 years ago
It's not really a problem with XDocReport with sax. hav you checked org.xmlpull.v1.sax2.Driver
is in your classpath in Android context?
Yes, I am guessing if it wasn't this would throw a ClassNotFoundException
Class obj = Class.forName("org.xmlpull.v1.sax2.Driver", true, this.getClass().getClassLoader());
Problem
I am attempting to get use XDocReport to automatically generate documents from templates in android. My code works fine as a unit test (I get the expected result), but as soon as I port it over to android I get and error stating "Can't create default XMLReader".
I followed a suggestion to manually set the system's SAX driver. After setting the system property, the code ran fine, but when I pull the document from my android device open office says the document is corrupted.
It would be convenient if there were a way to manually set your parser for each document.
Is there a a way to fix this?
Errors
Code