-
July 13th, 2004, 07:21 AM
#1
XML and optional fields
I have a class, which currently requires all public fields to be present, does anybody know what i have to add to make certain fields optional
Thanks
-
July 13th, 2004, 09:28 AM
#2
When you define the schema, set:
use='optional'
Good Luck,
Craig - CRG IT Solutions - Microsoft Gold Partner
-My posts after 08/2015 = .NET 4.x and Visual Studio 2015
-My posts after 11/2011 = .NET 4.x and Visual Studio 2012
-My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
-My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
-My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
-My posts before 04/2007 = .NET 1.1/2.0
*I do not follow all threads, so if you have a secondary question, message me.
-
July 14th, 2004, 01:28 AM
#3
Originally Posted by britcyberguy
I have a class, which currently requires all public fields to be present, does anybody know what i have to add to make certain fields optional
Thanks
In additional to Craig answer: if the fields stored as attributes, you can specify use="optional" in the schema. Otherwise (if the fields stored as elements), you should set minOccurs attribute of the corresponding element to 0.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|