<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm not sure if I'll get replies to this, so please 
send me an responses.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I am one step away from using schema to validate my 
xml, xml that is generated by JDOM, but I have one last problem.&nbsp; I cannot 
for the life of me figure out how to specify xsi:nil="true" as an element 
attribute.&nbsp; I NEED this so that my incoming xml can specify to nullify the 
data in my text node, because if I don't allow nulls, then types that are 
specified as xs:dateTime for instance are rejected by the parser because it 
assumes a date is there and won't accept empty values.&nbsp; I do not find it 
acceptable to change this to xs:string.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>So, here is my sample code.&nbsp; I am no guru, and 
am one step removed from the apes as far as my knowledge goes, so go easy on 
me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>org.jdom.Element elem = new Element( 
"SampleElement" );</FONT></DIV>
<DIV><FONT face=Arial size=2>elem.setAttribute( "xsi:nil", "true" 
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>That's what I'd like to do.&nbsp; This throws an 
exception because I'm not allowed to have a colon in the attribute name.&nbsp; 
So I fooled around with setting the Namespace to xsi, and I won't bother telling 
you what the exception was.&nbsp; I'm not even sure if "xsi" is a namespace, or 
is a publicId or a systemId.&nbsp; Don't know.&nbsp; Maybe you can help.&nbsp; 
But whatever it is, I need to know how to get it done with JDOM.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Can anybody help?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Scott</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>