public class XmlValidator extends Object implements ObjectValidator<String>
Constructor and Description |
---|
XmlValidator(File xmlSchemaFile) |
XmlValidator(Schema schema) |
XmlValidator(String xmlFile) |
XmlValidator(URL xmlSchema) |
Modifier and Type | Method and Description |
---|---|
String |
getEncode() |
boolean |
isValidate(String xmlString)
对象验证方法,验证T类型的对象是否正确
|
void |
setEncode(String encode) |
public XmlValidator(String xmlFile) throws ConvertException
ConvertException
public XmlValidator(Schema schema)
public XmlValidator(File xmlSchemaFile) throws ConvertException
ConvertException
public XmlValidator(URL xmlSchema)
public String getEncode()
public void setEncode(String encode)
public boolean isValidate(String xmlString) throws ConvertException
ObjectValidator
isValidate
in interface ObjectValidator<String>
xmlString
- 要验证的对象ConvertException
- 验证中出现的异常Copyright © 2006–2018 TinyGroup. All rights reserved.