473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Inheriting from XmlElement

Hello

something I want to ask...... why on earth you cannot inherit from
XmlElement???? .... or you can but XmlElement constructor is protected
or private and so you cannot define an empty constructor. Even when I
tried building a constructor with the exact parameters like XmlElement
it wouldn't work!!!!

"Error 1 No overload for method 'XmlElement' takes '0' arguments"

Any workarounds or ideas?

Feb 28 '07 #1
4 4350
Can we take a step back? *why* do you want to inherit from XmlElement?
What are you trying to do? As this will steer the most appropriate
workaround.

For reference, you can IIRC inherit from XmlNode (can be used to
provide some fun late xml serialization wossits under WSE etc)

Marc

Feb 28 '07 #2
On Feb 28, 4:08 pm, "Marc Gravell" <marc.grav...@gmail.comwrote:
Can we take a step back? *why* do you want to inherit from XmlElement?
What are you trying to do? As this will steer the most appropriate
workaround.

For reference, you can IIRC inherit from XmlNode (can be used to
provide some fun late xml serialization wossits under WSE etc)

Marc
Hello Marc Gravell

basically I making some design to sort making a strongly typed
collection of XmlElements to be used in an XmlDocument.... I have
about 5 classes each inheriting from XmlElement....

Feb 28 '07 #3
Have you tried using the non-default base ctor?

public class TestElement : XmlElement {
public TestElement(string prefix, string localName, string
namespaceUri, XmlDocument doc)
: base(prefix, localName, namespaceUri, doc) {

}
}

Marc

Mar 1 '07 #4
On Mar 1, 7:23 am, "Marc Gravell" <marc.grav...@gmail.comwrote:
Have you tried using the non-default base ctor?

public class TestElement : XmlElement {
public TestElement(string prefix, string localName, string
namespaceUri, XmlDocument doc)
: base(prefix, localName, namespaceUri, doc) {

}

}

Marc
yes it worked thanks very much you rock!

Mar 5 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: john diss | last post by:
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...
2
by: Pluto | last post by:
What is the difference between XmlNode and XmlElement? I'm trying to implement the code at http://www.devx.com/dotnet/Article/11616/0/page/3 in C# and I'm getting an error at this line:...
6
by: Timothy V | last post by:
Hi, I have and XmlElement from within an XmlDocument. I wish to RemoveAll() from within the XmlElement plus itself. For example: <Notes> <Note id="n1"> <Info>A message</Info> </Note> <Note...
4
by: Steven.Xu | last post by:
Hello everyone. I have two instance of xml.xmldocument. One is XA another is XB. XA has a child node XA1. XA1 has many attributes and child nodes. Now I want to copy XA1 to XB with all of it's...
2
by: Compic | last post by:
Hi! I have this class: public class StoredItemElement : XmlElement { protected internal StoredItemElement(string prefix, string localName, string namespaceUri, XmlDocument doc) :...
0
by: Vicenç Masanas | last post by:
I want to specialize XmlElementAttribute so I can control how an specific property is serialized, but I cannot get what methods should I override to accomplish this. <Serializable()> Public...
2
by: Anirudh | last post by:
Hi, i wanted to know if there is any way to convert an object to XMlText to XMLElement. Thanks in advance.
1
by: andrej | last post by:
hi, ich habe eine anwendung, welche ein xml document erstellt. um festzustellen, ob ein element bereits vorhanden ist, verwende ich die funktion selectsinglenode( ....) diese funktion...
1
by: funkymp | last post by:
im trying to create a user interface that allows a user to upload there own mixes which are then added to a itunes podcast. basically, my problem is. when it updates the podcast.xml file, i need...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.