try
{
XmlAnySimpleType val = model.getDefaultValue();
XmlOptions opt = new XmlOptions();
opt.put(XmlOptions.VALIDATE_TEXT_ONLY);
if (!val.validate(opt))
throw new Exception();
SchemaPropertyImpl sProp = (SchemaPropertyImpl)parentType.getElementProperty(model.getName());
if (sProp != null && sProp.getDefaultText() != null)
{