views:

488

answers:

7

hi, In java there is class SchemaFactory which is used for schema validation but it is not available in android is there any other option available

A: 

You could try using the validator from the XML implementation directly. Either see if you can find the validator classes in whatever XML parser comes with Android, or use a standalone validator like MSV

Sii
A: 

hi , i am using JDOM parser but i am getting an exception while running on emulator java.rmi.RemoteException does JDOM use is ok for validating the xml with schema .Can i get a link where i can get to see an example for the same in android Any help would be appreciated Thnx in advance...

Sam97305421562
please put these as comments or clarifications in the question or other responses and delete these non-"answers" before they start getting downvoted...
Alnitak
A: 

So long as the SchemaFactory class requires no JNI code you can just import its .jar file into your Android project and use it directly.

Alnitak
A: 

Hi , I have searched for the SchemaFactory jar but its size is 1.7mb which is not worth for using only one class is there any other way......

Sam97305421562
A: 

hi , As this jar size would increase which would result in large apk file which i wanted to avoid that as JDOM is open source is there any other option as i am searching for that but not getting the right option ... Thnx in advance...

Sam97305421562
A: 

There is currently no XSchema support in Android. This was true in version 1.0, and I just looked at the changes in 1.5 and no changes have been made to any of the xml packages, so it appears to me it's still true. I don't have the source > 1.0 though.

In the 1.0 source code there's the following comments in various parser classes:

// TODO No XSchema support in Android 1.0. Maybe later.

So you'll have to bundle your own classes or skip schema validation altogether for now. It's probably not a high priority feature for them.

JRL
A: 

hi, I have found the jar of jaxp which includes the classes which i need for schema validation But there is some issue, if i import the jar there are some classes which are already there in android which is not allowing to compile the code is any solution available for that .... Thnx in advance for the help ....

Sam97305421562