Monday, October 29, 2007

XML classes conversion

Well, here's a peculiar situation! There's a webservice that runs on a server side and at request populates an XmlDocument object and simply sends it back. On the other side this so-called object arrives in form of an XmlNode which is an interface made to abstract ALL XML objects you'd create.

So ideally I should be able to get my hands on the object of type XmlDocument on a client side after casting that dreadful XmlNode object. Right? Wrong! The object comes back as an XmlElement instead!

You see, the saddest thing is that I am not sure that this behaviour is guaranteed! How can Microsoft exhibit no trust to the users-developers of its software and hire half-assed developers to create products? Things definitely need to change over there. And preferably in both aspects!

1 comment:

Anonymous said...

Well said.