Re: validating instance against schema? (my first post to the list-:))
amol kat <[email protected]> Fri, 27 Jun 2003 16:05:02 +0530
| Newsgroups | gmane.comp.java.sun.xml.general |
|---|---|
| Message-ID | <[email protected]> |
Got the solution to this one... http://wwws.sun.com/software/xml/developers/multischema/ Thanks, Amol ----- Original Message ----- From: amol kat To: [email protected] Sent: Friday, June 27, 2003 11:24 AM Subject: validating instance against schema? (my first post to the list-:)) Hi, I want to validate my xml instance against the schema. i want to do this programatically. now one way i know of is to set the schema attribute in the document and apply a parser with validation set to true. now my problem: there may be 1000 instance documents of that schema which may be changing frequently in memory. everytime if i validate using the above method, will the parser load the schema xsd from the file system? i think it will. and if it does, then the performance hit would be unacceptable. isnt there a way in which all the "schema objects" can be created in memory once and used again and again for validating its corresponding instance documents? something like a validate(oDocument:Document, oSchema:Schema):ValidationErrors api somewhere? Thanks in advance, Amol