Hi, Since XMLSchema can represent both nilled and empty elements, we have decided to model that in XMLBeans too. If you want a "nilled" element (xsi:nil="true"), then you call the respective setter with "null" as parameter. If you want to remove an element, use unset.
Radu On Mon, 2009-03-02 at 16:32 -0500, riya wrote: > Hi, > > We are using xml beans to generate certain xmls. > I noticed that when we don't have any values to populate for some tags, -- > xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -- gets > inserted. > > For eg: I took following tags from one of the xml's generated this way. > > <COMPTIA_CODE xsi:nil="true" > xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"/> > <AGREEMENT_CODE/> > <PART_NUM xsi:nil="true" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> > <COD_REQ xsi:nil="true" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> > > My requirement is instead of getting: > > <COD_REQ xsi:nil="true" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> > > I should just get: > > <COD_REQ/> > > Please advise. > > Thanks In advance! > -- > View this message in context: > http://www.nabble.com/XMLBean-usage-issues-tp22296981p22296981.html > Sent from the Xml Beans - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

