Answer the question
In order to leave comments, you need to log in
Xml validation - all optional attributes?
Hello,
please tell me if it is possible and if possible, how to register in xsd so that xml does not check attributes during validation.
In one case, they may not be in the other, and not all attributes are known in advance, so that each one should be written in "optional". Therefore, I want to check only the presence of the necessary tags, and not attributes either.
schema = factory.newSchema(new StreamSource(xsdFileInputStream));
Validator validator = schema.newValidator();
validator.validate(new StreamSource(new StringReader(xmlString)));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question