O'Reilly logo

Applied XML Programming for Microsoft® .NET by Dino Esposito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending the XML DOM

Although the .NET Framework provides a suite of rich classes to navigate, query, and modify the contents of an XML document, there might be situations in which you need more functionality. For example, you might want a node class with more informative properties or a document class with extra functions. To obtain that class, you simply derive a new class from XmlNode, XmlDocument, or whatever XML DOM class you want to override. Let’s see how.

Custom Node Classes

As a general rule of thumb, you should avoid deriving node classes from the base class XmlNode. If necessary, derive node classes from a specialized and concrete node class like XmlElement or XmlAttribute. This will ensure that no key behavior of the node is lost ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required