views:

786

answers:

1

hi, I have created an XML and i am having an XSD file and i have to validate the xml with this schema ,can i get any example for doing that . And where i have to place the xsd file in my project so that i can validate with that schema.

+1  A: 

This may not help a lot, but last I checked, Android platform was somewhat limited Java environment. And the main problem is that some APIs one would expect to be available -- specifically, javax.xml.validation (part of JDK 1.5 and anove!) -- are not there.

As such you may need to include more jars than would be done on a non-castrated java platform. Further there may be limitations as to what standard APIs can be added, due to black/whitelisting problems (this is a big problem with Google AppEngine, and since Android predates it, it has similar challenges).

That aside, I would try to use javax.xml.validation with bundled XML parser Xerces. There are gazillions of how-to documents on how to do that.

StaxMan