ReadXML and Empty Elements in XML

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)
 
B

Brett Keown [MSFT]

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.
 
B

Brett Keown [MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top