Tuesday, 6 August 2013

The name "context:annotation-config" is not legal for JDOM/XML

The name "context:annotation-config" is not legal for JDOM/XML

How i can write this :
<context:annotation-config/>
<context:component-scan base-package="com.generator"/>
using jdom2.
i tried by :
beans.addContent(new Element("context:annotation-config"));
beans.addContent(new
Element("context:component-scan").setAttribute("base-package","com."+getProjectName()))
but i had this error:

The name "context:annotation-config" is not legal for JDOM/XML elements:
XML name 'context:annotation-config' cannot contain the character ":".

No comments:

Post a Comment