<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: minOccurs=0 for Int type</title><link>https://www.infopathdev.com:443/forums/thread/6788.aspx</link><pubDate>Thu, 05 May 2005 19:34:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6788</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6788.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6788</wfw:commentRss><description>You can edit Schema file and have a "nillable" attribute on it. You can also add "xsi:nil" attribute to a node. Here is a way how to do it,&lt;br /&gt;&lt;br /&gt;private void setNil(IXMLDOMNode oNode)  //oNode is your Node for which you dont want to enter a value&lt;br /&gt;{&lt;br /&gt;	IXMLDOMElement oElement = (IXMLDOMElement)oNode;&lt;br /&gt;	if(null != oElement.getAttribute("xsi:nil"))&lt;br /&gt;	{&lt;br /&gt;           // Create xsi:nil attribute with the proper namespace.&lt;br /&gt;	   IXMLDOMAttribute oNil = (IXMLDOMAttribute)oNode.ownerDocument.createNode((int)DOMNodeType.NODE_ATTRIBUTE, "xsi:nil", "http://www.w3.org/2001/XMLSchema-instance");&lt;br /&gt;	   oNil.text = "true";&lt;br /&gt;           //Set the "xsi:nil" attribute to the node&lt;br /&gt;      	   oElement.setAttributeNode(oNil);&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Re: minOccurs=0 for Int type</title><link>https://www.infopathdev.com:443/forums/thread/6787.aspx</link><pubDate>Thu, 05 May 2005 06:44:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6787</guid><dc:creator>fratellino</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6787.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6787</wfw:commentRss><description>Thanks for replying.&lt;br /&gt;&lt;br /&gt;the xml is not generate by me, but auto-generated by the .asmx file builded with Visual Basic.net&lt;br /&gt;So I can't edit this values, or if I can I don't know how.&lt;br /&gt;&lt;br /&gt;Andrea</description></item><item><title>Re: minOccurs=0 for Int type</title><link>https://www.infopathdev.com:443/forums/thread/6786.aspx</link><pubDate>Thu, 05 May 2005 04:09:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6786</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6786.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6786</wfw:commentRss><description>Hi fratellino, Welcome tot he Board!&lt;br /&gt;Minoccurs "0" does not mean that it is a compulsory field, It means that the total number of occurences of that element can be "0" i.e, the element can be or Cannot be there in the XML.&lt;br /&gt;Usually "integer" and "datetime" fields are made compulsory in the Infopath, to override this you can have "nillable" attribute set on Elements with "integer" and "DateTime" types.&lt;br /&gt;So your element can look like this&lt;br /&gt;&amp;lt;s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" nillable="true"/&amp;gt;&lt;br /&gt;&lt;br /&gt;and you need to set "xsi:nil='true'" in xml&lt;br /&gt;&amp;lt;DateBirth xsi:nil="true"&amp;gt;&amp;lt;/DateBirth&amp;gt;.&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>minOccurs=0 for Int type</title><link>https://www.infopathdev.com:443/forums/thread/4647.aspx</link><pubDate>Wed, 04 May 2005 13:55:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4647</guid><dc:creator>fratellino</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4647.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4647</wfw:commentRss><description>I'm a newbie in Infopath.&lt;br /&gt;&lt;br /&gt;I've created a small webservice with Visual Basic.Net for comunicate with an Access DB.&lt;br /&gt;&lt;br /&gt;In the VB Code there is a Type called "Census" like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Public Class Census&lt;br /&gt;   Public ID as Int32&lt;br /&gt;   Public DateBirth as Date&lt;br /&gt;   Public Name as String&lt;br /&gt;End  Class&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If I look to the WSDL it seems like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;s:complexType name="Census"&amp;gt;&lt;br /&gt;   &amp;lt;s:sequence&amp;gt;&lt;br /&gt;      &amp;lt;s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int"/&amp;gt;&lt;br /&gt;      &amp;lt;s:element minOccurs="1" maxOccurs="1" name="DateBirth" type="s:dateTime"/&amp;gt;&lt;br /&gt;      &amp;lt;s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string"/&amp;gt;&lt;br /&gt;   &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;&amp;lt;/s:complexType&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I would like that minOccurs for ID and DateBirth is 0 not 1 so that in Infopath I'm not obliged to insert a value for it. Alternatively I need a way to obviate this problem&lt;br /&gt;&lt;br /&gt;How can I do this??&lt;br /&gt;&lt;br /&gt;Thanks for replying and excuse me for my bad english.</description></item></channel></rss>