This content has been marked as final.
Show 2 replies
-
1. Re: ObjectModelFactories parsing empty xml elements
starksm64 Jan 3, 2007 11:56 PM (in response to anil.saldhana)There is no reason for the setValue to be called on an empty element. There would have to be both a newChild and setValue to handle both cases. You don't need a separate SecurityDomain as you can return the parent element:
public Object newChild(ConfigurationMetaData md, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs) { Object child = null; if (localName.equals("cluster-config")) { child = new ClusterConfigMetaData(); } else if(localName.equals("container-interceptors") || localName.equals("container-cache-conf") || localName.equals("container-pool-conf")) { child = new DomElement(newDomElement(localName, attrs)); } else if(localName.equals("security-domain")) { child = md; // Indicate a security-domain element was seen... md.setSecurityDomain(null); } return child; }
-
2. Re: ObjectModelFactories parsing empty xml elements
anil.saldhana Jan 4, 2007 12:33 PM (in response to anil.saldhana)Thanks Scott. That did the trick. I had tried the combination of setValue and newChild but did not figure out returning the parent element.