Closed Fangio92 closed 1 month ago
I am no Android developer, so I can't help you. However, I found https://developer.android.com/reference/javax/xml/parsers/SAXParserFactory while googling so I am pretty sure there is a way :)
Thanks for the response. I spent some time figuring this out and obviously googling this before I reached out to you.
Exactly, there is SAXParserFactory but not a method called newDefaultInstance as you can see in the link you sent me - which is basically what this error NoSuchMethodError means. https://github.com/phax/ph-commons/blob/f8305c8b5f1b4fe02f2a6fb7ef3f71d4a0fa797e/ph-xml/src/main/java/com/helger/xml/XMLFactory.java#L446
Ah, I see. That is a Java 9 method:
/**
* Creates a new instance of the {@code SAXParserFactory} builtin
* system-default implementation.
*
* @return A new instance of the {@code SAXParserFactory} builtin
* system-default implementation.
*
* @since 9
*/
public static SAXParserFactory newDefaultInstance() {
return new SAXParserFactoryImpl();
}
Finally resolved this for the 11.1.7 release of ph-commons - this should to the trick
Hello,
I am trying to use this library (ubl 2.1)in the Android Kotlin project but I am getting NoSuchMethodError when trying to parse invoice XML with
UBL21Marshaller.invoice().read(invoice)
Complete stacktrace:
If you could help me I would be grateful. Thanks.