Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NULL values in XML files?
Message
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
00826140
Message ID:
00826271
Vues:
23
XSD has support for nullable fields in the XML - make sure the schema indicates this when you export the data (you may need MissingSchemaAction to force that to happen properly).

+++ Rick ---

>What I'm getting is an XML validation error if I try to leave an empty tag for a float element - "element has an invalid value according to its data type"
>
>I get the same validation error if I leave date, boolean or any other non-string elements empty.
>
>>Steve,
>>
>>Allowing NULLs seems to be the default if nothing else is specified (I don't see anything specifed one way or the other in our .xsd files). As far as the data itself goes, a null value would be represented in the XML by just leaving the tag empty.
>>
>>    <street>Foo</street>
>>    <apartment />
>>
>>In the above example, apartment is a NULL field.
>>
>>
>>~~Bonnie
>>
>>
>>
>>>How can I go about a) permitting null values for an element defined in an XSD file, and b) express a null value in an XML element?
>>>
>>>I note the "nillable" attribute for an element definition, but setting the nillable attribute to "true" doesn't allow me to either leave the element empty, or with a value of "NULL" or "nil".
>>>
>>>FWIW, the element I'm dealing with uses a float data type, but needs to permit the equivalent of a null value.
>>>
>>>Thanks.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform