[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-user
Subject: RE: How to omit xsi:ni ?
From: "Radu Preotiuc-Pietro" <radup () bea ! com>
Date: 2008-04-25 0:06:03
Message-ID: BF6B6CA032BA0A429BD924F96765147DBF2F33 () repbex02 ! amer ! bea ! com
[Download RAW message or body]
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.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=796010200-25042008><FONT face=Arial
color=#0000ff size=2>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).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796010200-25042008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796010200-25042008><FONT face=Arial
color=#0000ff size=2>To answer your second question, see the JavaDoc for
XmlObject.validate(XmlOptions).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796010200-25042008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796010200-25042008><FONT face=Arial
color=#0000ff size=2>Radu</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; \
MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Gustavo Aquino
[mailto:aquino.gustavo@gmail.com] <BR><B>Sent:</B> Friday, April 11, 2008 1:55
PM<BR><B>To:</B> user@xmlbeans.apache.org<BR><B>Subject:</B> How to omit
xsi:ni ?<BR></FONT><BR></DIV>
<DIV></DIV>hi ,<BR><BR>How can i omit (xsi:nil="true") in my XML generated by
XMLBeans when a attribute is null ?<BR><BR>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 ?<BR><BR>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
?<BR><BR>regards.<BR><BR></BLOCKQUOTE></BODY></HTML>
<br>
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic