开发者

WebLogic com.bea.xml XML validation

开发者 https://www.devze.com 2023-01-18 07:27 出处:网络
I am not sure if I implementing this API properly to validate an XML: XmlOptions xmlOp = new XmlOptions();

I am not sure if I implementing this API properly to validate an XML:

XmlOptions xmlOp = new XmlOptions();
xmlOp.setDocumentSourceName("C:/Dir/SubDir/SubDir2/myfile.xsd");
assertTrue(doc.validate(xmlOp));

I 开发者_开发技巧want to validate the xml object doc against the schema File myfile.xsd. The assertion is passing but I wanted to make sure that it is passing for the right reason.

Thanks


This WebLogic method does not validate an XML against a schema. The class Validator in javax.xml.validation.Validator is what I intended to use.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号