Error in xmltextreader?

J

Jan Eliasen

Hi

I am currently trying to write an VB.NET application that reads an
xml-document and writes another xml-document.

If I look at msdn.microsoft.com, it seems that if the xmltextreader
reads a <elementname attr="value" /> then the
"isElementEmpty"-property of the xmltextreader should be true. It
isn't, however. On msdn it says that the documentation is based on
..NET framework 1.1 - is it possibly a bug in the framework 1.0?

If anyone has an idea for a workaround (other than upgrading my VS.NET
:) then I'd like to hear about it.
 
J

Jan Eliasen

Everyone, please ignore this posting and feel free to call me an
idiot! :) Problem solved. I needed to read the isEmptyElement
property before iterating over the attributes... silly me.
 
J

Jon Skeet [C# MVP]

Jan Eliasen said:
I am currently trying to write an VB.NET application that reads an
xml-document and writes another xml-document.

If I look at msdn.microsoft.com, it seems that if the xmltextreader
reads a <elementname attr="value" /> then the
"isElementEmpty"-property of the xmltextreader should be true. It
isn't, however. On msdn it says that the documentation is based on
.NET framework 1.1 - is it possibly a bug in the framework 1.0?

If anyone has an idea for a workaround (other than upgrading my VS.NET
:) then I'd like to hear about it.

Could you provide a short but complete example which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for what I mean.
 

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