Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / July 2006

Tip: Looking for answers? Try searching our database.

Problems with XmlNodeList

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bigeddie - 12 Jul 2006 11:18 GMT
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
Martin Honnen - 12 Jul 2006 13:56 GMT
> 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.

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.