470,594 Members | 1,131 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

problem inheriting from XmlDocument and XmlElement

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
1 2309
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.

Similar topics

1 post views Thread by nibble | last post: by
1 post views Thread by Casper JH Erasmus | last post: by
1 post views Thread by John Wilhelm | last post: by
1 post views Thread by Viral | last post: by
13 posts views Thread by sherifffruitfly | last post: by
4 posts views Thread by Varangian | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.