wallzs <[EMAIL PROTECTED]> wrote on 06/30/2006 07:40:32 AM:
> Hi!,
>
> It's the first time I use xerces and I know a little about it, but not
> sufficient to solve my problem:
> I've tried to parse an xml file with an external schema and I had no
> problem, but the problem began when I tried to do it with a schema
INSIDE
> the xml file I wanted to proccess.
You need to turn on the schema validation [1] feature.
> I have been looking for my problem in official page and I haven?t seen
> anything about it.
> I show the part of the code:
>
> " try
> {
> DOMParser parse = new DOMParser();
> parse.setFeature("http://xml.org/sax/features/validation",
> true);
> parse.setProperty(
>
>
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
> "cabecera.xsd");
> ErrorChecker errors = new ErrorChecker();
> parse.setErrorHandler(errors);
> parse.parse(docFile.toString());
> }
> catch (Exception ex)
> {
> System.err.print("Problem parsing the file.");
> throw new Exception("Error en el formato: " +
ex.getMessage());
> }"
>
> I think the problem is in the line in which I set the property with
> ".setProperty" with "external-noNamespaceSchemaLocation".
>
> Could anyone give me any clue?
> Thanks very much in advance.
[1] http://xerces.apache.org/xerces2-j/features.html#validation.schema
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]