错误类型:cvc-complex-type-2-3

错误的类型如下:

cvc-complex-type-2-3

 Element ''{0}'' cannot have character [children],because the type''s content type is element-only.

在XML中是一般来说是不允许一些字符作为定义外的元素存在的,要不然就会报如下的类似错误了:

Caused by: org.xml.sax.SAXParseException; lineNumber: 83; columnNumber: 9; cvc-complex-type.2.3: Element 'beans' cannot have character [children],because the type's content type is element-only.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(UnkNown Source)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(UnkNown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnkNown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(UnkNown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(UnkNown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(UnkNown Source)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(UnkNown Source)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(UnkNown Source)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
	at org.springframework.beans.factory.xml.XmlBeanDeFinitionReader.doLoadBeanDeFinitions(XmlBeanDeFinitionReader.java:388)
	... 22 more

咱就是在删除注解的时候,没有删干净,最后挂了。

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念