You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Gustavo Aquino <aq...@gmail.com> on 2008/04/11 22:55:28 UTC

How to omit xsi:ni ?

hi ,

How can i omit (xsi:nil="true") in my XML generated by XMLBeans when a
attribute is null ?

When i use validate of my Document, if i have problems in my xml he return
false, ok, but how can i know what attribute is wrong ?

I need compose a friendly message to my user with error in XML, to do it i
need to know what is wrong, how to do this ?

regards.

RE: How to omit xsi:ni ?

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
The reason that you have xsi:nil showing up in your document, is because
you are setting an element value to null (not an attribute). Try using
unsetXXX() instead of setXXX(null).
 
To answer your second question, see the JavaDoc for
XmlObject.validate(XmlOptions).
 
Radu


________________________________

	From: Gustavo Aquino [mailto:aquino.gustavo@gmail.com] 
	Sent: Friday, April 11, 2008 1:55 PM
	To: user@xmlbeans.apache.org
	Subject: How to omit xsi:ni ?
	
	
	hi ,
	
	How can i omit (xsi:nil="true") in my XML generated by XMLBeans
when a attribute is null ?
	
	When i use validate of my Document, if i have problems in my xml
he return false, ok, but how can i know what attribute is wrong ?
	
	I need compose a friendly message to my user with error in XML,
to do it i need to know what is wrong, how to do this ?
	
	regards.
	
	


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.