ReadXML and Empty Elements in XML

  • Thread starter Thread starter Atul Agarwal
  • Start date Start date
A

Atul Agarwal

Our software reads XML from various sources and updates our database.
We use a dataset (which has already been "schema filled" from the
database)
to read the XML in. The problem is that if the ReadXML encounters an
empty
element for, say, a Double or DateTime like element it throws an
exception.

Is there any way to tell the ReadXML to ignore such empty elements and
cause the corresponding column to be set to a DBNull.

Thanks

Atul Agarwal
(e-mail address removed)
 
Hello Atul,

Thanks for participating in the community! I am currently researching your
question and will reply back with my findings ASAP. Thanks for your
patience.

Brett Keown
Microsoft Support
(e-mail address removed)

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Atul,

Can we get the exception message you are hitting. Also, are you using the
1.1 framework? You may need to use the "nil" attribute for the empty
elements. You can look up info on your attribute in the .net framework SDK
doc.

Brett Keown
Microsoft Support
(e-mail address removed)

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top