0

I'm working with a Android App and XML. By using Jaxb, I had java xml classes from a .xsd file.

I want to generate a xml file from these xml classes then validate against the .xsd file.

I found here an example: http://www.mkyong.com/java/jaxb-hello-world-example/

But I cannot use javax.xml.bind.Marshaller:

Error:(76, 27) error: cannot access XMLEventWriter
class file for javax.xml.stream.XMLEventWriter not found

Then I add javax.xml.stream lib:

java.exe finished with non-zero exit value 1

I also posted a question about xml validation against xsd but till now I have not get any suggestion yet: Android XML validation using XSD ( both xerces and SchemaFactory) error

Any suggestion for me? Thanks,

Community
  • 1
  • 1
Anh-Tuan Mai
  • 1,129
  • 19
  • 36
  • Last time I checked JAXB was not supported on Android. http://stackoverflow.com/questions/5461127/using-jaxb-with-google-android – lexicore Jun 30 '15 at 18:37

1 Answers1

0

Short answer: XML Validation: xerces for android: https://code.google.com/p/xerces-for-android/source/checkout

XML Serialization: http://simple.sourceforge.net/

.xsd to java objects: Jaxb or Jibx

Is there a need in JAXB implementation for Android?

Community
  • 1
  • 1
Anh-Tuan Mai
  • 1,129
  • 19
  • 36