Hi all,

I would like to validate a xml document against a given xsd.
My xml document doesn't contain any xsi:schemaLocation but the given xsd
is well known.

Below I reported a piece of code:

  File xmlFile = new File(xmlFilePath);
  XmlObject xml = XmlObject.Factory.parse(xmlFile);
                
  System.out.println("Schema type: " + xml.schemaType()); //output is
'Schema type: N='

  // Validate the XML.
  boolean isValid = xml.validate(validateOptions);

If I know what is the given xsd (xsdFilePath), how can I specify what
xsd to be used ?
Is there any setSchemaType() / assignSchemaType() ?

Thanks
Patrizio

IMPORTANT:
This e-mail transmission is intended for the named
addressee(s)only.
Its contents are private, confidential and protected
from disclosure and should not be read, copied or
disclosed by any other person.
If you are not the intended recipient, we kindly ask
you to notify the sender immediately by telephone
(+41 (0)58 806 50 00), to redirect the message to the
account "[EMAIL PROTECTED]" and to delete this e-mail.
E-mail transmissions may be intercepted, altered or
read by unauthorized persons and may contain viruses.
Therefore, it is recommended that you use regular mail
or courier services for any information intended to be
confidential. However, by sending us messages through
e-mail, you authorize and instruct us to correspond by
e-mail in the relevant matter.
Thank you.


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

Reply via email to