I want to use the StAX API implementation on android 1.6 and above devices. Are there any implementations? I cannot use the jar file directly, as it gives problems with the inner class. If it is not available, is there a way to recompile the implementation? Is there an alternative way to map the POJO class to XML and vice versa, excluding the SAX parser and the DOM parser.
I think the POJO class can be mapped to XML and vice versa using JAXB. But the situation is like this. Consider this example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cars> <car registration="abc123"> <brand>BMW</brand> <description>Sedan</description> </car> <car registration="abc123"> <brand>Ferrari</brand> <description>SportsCar</description> </car> </cars>
Now, as a result, I want a List that has 2 cars.
Also, how does a JAXB parser pay against StAX?
source share