Hi Alberto, That exactly what I did, however if a reference to a schema exists in the XML file Xerces will also try to resolve it.
How can I tell Xerces to ignore any schema reference that is written in the XML and use only the external-schema? Thanks, Yair --- Alberto Massari <[EMAIL PROTECTED]> wrote: > Hi Yair, > You should use > setExternalSchemaLocation/setExternalNoNamespaceSchemaLocation > > Alberto > > At 00.50 02/04/2007 -0700, sade wrote: > >Hello, > > > >My server gets an XML as inputs from its clients. > Part > >of the security checks are schema validations (to > see > >that the XML is valid). > > > >Therefore, I need a to perform schema regardless > what > >is written in teh document. > > > >What I did is the following: > > > >1. Loaded a cacheed schema via parser.LoadSchema() > >2. Set an external schema location > > > >Doing that helped me to verify the XML only if it > >explicitly includes the namespace and schema > (xmlns, > >xsi:schemaLocation). > > > > From security reasons I would like to ignore any > >namespace/schemaLocation that was specified in teh > XML > >and use only my pre-defined XSD. > > > >Does anyone has any suggestions? > >How can I tell Xerces-C to ignore the > >namespaceds/schemas that are writtens in the XML > and > >use pre-determined ones? > > > >regaeds, > >Yair > > ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091
