By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,278 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,278 IT Pros & Developers. It's quick & easy.

problem inheriting from XmlDocument and XmlElement

P: n/a
hello there everyone..
I have created a class called "ProcessLog" inheriting from XmlDocument
and two classes
("UploadedItem", "ProcessError") inheriting from XmlElement.

I then have two classes ("UploadedTemplate", "UploadedPresentation") which
inherit from "UploadedItem")... so far so good.
I have overriden the CreateElement method of "ProccessLog" and it creates
the correct elements as expected. The problem is I need to override
SelectSingleNode and SelectNodes to return types "UploadedPresentation",
"UploadedTemplate" and "ProcessError".

I have tried several different ways but always return XmlElement or get a
casting error. I have searched msdn and google but to no avail...
Does anyone have any ideas or an example?... cheers John D
Nov 11 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
As a quick wwork around you could consider overriding these methods,
invoking the base implementation then copying the results into
"UploadedPresentation", "UploadedTemplate" and "ProcessError" types.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"john diss" <do*********@to.spam.me.ta> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
hello there everyone..
I have created a class called "ProcessLog" inheriting from XmlDocument
and two classes
("UploadedItem", "ProcessError") inheriting from XmlElement.

I then have two classes ("UploadedTemplate", "UploadedPresentation") which inherit from "UploadedItem")... so far so good.
I have overriden the CreateElement method of "ProccessLog" and it creates
the correct elements as expected. The problem is I need to override
SelectSingleNode and SelectNodes to return types "UploadedPresentation",
"UploadedTemplate" and "ProcessError".

I have tried several different ways but always return XmlElement or get a
casting error. I have searched msdn and google but to no avail...
Does anyone have any ideas or an example?... cheers John D

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.