[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Getting content of XML element

adrian@jboss.org do-not-reply at jboss.com
Tue Nov 20 14:13:12 EST 2007


"kabir.khan at jboss.com" wrote : 
  | Also, for a similar schenario I will need to construct a org.w3c.dom.Element from the nested contents of a element. Is that possible?
  | 

It works with the annotation based parsing.

  | public class ElementWildcard
  | {
  |    private Element wildcard;
  | 
  |    public Element getWildcard()
  |    {
  |       return wildcard;
  |    }
  | 
  |    @XmlAnyElement(lax=true)
  |    public void setWildcard(Element wildcard)
  |    {
  |       this.wildcard = wildcard;
  |    }
  | }
  | 
I couldn't get it to work properly with the old parser.

Why do you want to do this? This is usually horrible.
Is this the old XmlLoadable stuff?

You should remove this, and configure them using the MC as normal beans.

Then if somebody really wants to do this horrible thing you just do

  | <property name='bad" type="org.w3c.dom.Element"><![CDATA[<xml-here/>]]></property>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106527#4106527

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106527



More information about the jboss-dev-forums mailing list