470,815 Members | 1,287 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Problems with XmlNodeList

Hi,

I'm trying to get an instance off a XmlNodeList without using
selectNodes(...)

XmlNodeList test1 = new XmlNodeList(); (C#)

but that doesn't work.

What's my mistake?

greetings

Ernst Juergen

Jul 12 '06 #1
1 7761


bigeddie wrote:
I'm trying to get an instance off a XmlNodeList without using
selectNodes(...)

XmlNodeList test1 = new XmlNodeList(); (C#)

but that doesn't work.
XmlNodeList in System.Xml is an abstract class, you can't construct
instances of abstract classes. When you use e.g. ChildNodes or
SelectNodes in the .NET framework then you get an instance of a concrete
implementation of XmlNodeList. However these concrete implementations
are not exposed publically so you can't use them directly.

Thus if you really want to create an XmlNodeList then you need to write
your own class extending XmlNodeList.

Why do you want to do new XmlNodeList()? Maybe there is a different way
using a document fragment for instance.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jul 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by DR BILRO | last post: by
5 posts views Thread by Chua Wen Ching | last post: by
3 posts views Thread by Musravus | last post: by
7 posts views Thread by John Bowman | last post: by
1 post views Thread by PaulF | last post: by
3 posts views Thread by Maurice Cosgrave | last post: by
4 posts views Thread by eggie5 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.