Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loading dataset from XML with Schema
Message
 
 
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01454990
Message ID:
01455741
Views:
25
>>>Hi,
>>>I understand that making the element optional will, of course, make it legal to omit it. But that wasn't really my point. If the XML language specification states that where a default value is specified for an element then it should be applied to any such empty element then one would expect the XML as posted by Dimitry to work.
>>>
>>>AFAICS there's also nothing in the XML specs that says that if an optional element is missing then it should be added using the default value - which *is* what is happening. I thought a missing element in XML should represent a null value. So how do you specify a null value for a table field in XML?
>>>
>>>In short I don't think the DataSet class is obeying the rules of XML - and in the case of empty elements I can't see *why* it should not do so. But I'm not that knowledgeable about XML (and even less about DataSets :-{ ) - maybe someone can point out where my thinking is wrong ?
>>>
>>
>>I am curious, in your WPF application what do you bind your controls to, if not DataSets? (This is in reply to your message that you are not knowledgeable about DataSets).
>
>I've been working with the Entity Framework for a while now. It uses the DataReader under the hood but DataSets (for better or worse) don't enter the picture.
>
>>
>>And getting back to XML. I know that in my VFP application the exactly same cases of processing XML with schema and defaults and empty tag gives expected result. That is, the value populated to the VFP cursor is the value of default.
>
>IMO VFP is correct and the failure of the XMLReader to use a default value for an empty element is a design flaw

Thank you for your reply.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform