If you are just going to use the schema to validate 1 instance, then you
can use the Xerces
external-schemaLocation/external-noNamespaceSchemaLocation properties.

If you are going to validate many instances against this one schema, then
(to get better performance), you can preparse and cache the schema. For
more information, please refer the grammar faq [1].

[1] http://xml.apache.org/xerces2-j/faq-grammars.html

HTH,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]



                                                                                
                                                
                      [EMAIL PROTECTED]                                         
                                                
                      nmobil.com               To:       [EMAIL PROTECTED]      
                                     
                                               cc:                              
                                                
                      09/03/2003 02:59         Subject:  API for pre-loading 
schema                                             
                      PM                                                        
                                                
                      Please respond to                                         
                                                
                      xerces-j-user                                             
                                                
                                                                                
                                                
                                                                                
                                                



Hi all,

I'm looking to pre-load a schema into the parser and validate an XML file
against that schema, regardless of the file's NoNamespaceSchemaLocation.
It looks like this might be possible from the docs I've looked at...but
does anyone have a quick example I could use to get started?  I know I
could parse the file, change the NoNamespaceSchemaLocation, and parse it
again, but that seems clumsy.  I am currently using a DOMParser but would
be open to other approaches.

Thanks very much,

David Shontz
ExxonMobil Exploration UTC
Application Support/Application and Data Integration
CORP-RR-603
281-654-7214
Email: David Shontz/U-Houston/ExxonMobil
Internet Email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to