Skip to Content
.NET & XML
book

.NET & XML

by Niel M. Bornstein
November 2003
Intermediate to advanced
476 pages
14h 38m
English
O'Reilly Media, Inc.
Content preview from .NET & XML

Name

XmlAttributeOverrides — System.Xml.Serialization (system.xml.dll)    class 

Synopsis

public class XmlAttributeOverrides {
// Public Constructors
   public XmlAttributeOverrides( );  
// Public Instance Properties
   public XmlAttributes this[ Type type, string member ]{get; } 
   public XmlAttributes this[ Type type ]{get; } 
// Public Instance Methods
   public void Add( Type type, string member, XmlAttributes attributes);  
   public void Add( Type type, XmlAttributes attributes);  
}

This type contains a collection of XmlAttributes objects, which are used to customize the way the XmlSerializer serializes an object to XML. Its Add( ) method has two overrides, one that takes a System.Type indicating the type of object it applies to and the XmlAttribute instance containing the attributes, and one that takes those two parameters plus a System.String containing the name of the member of the type to which the attributes apply.

The XmlAttributeOverrides instance is passed to the XmlSerializer constructor to create the serializer with the overriden attributes.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Applied XML Programming for Microsoft® .NET

Applied XML Programming for Microsoft® .NET

Dino Esposito
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0596003978Supplemental ContentErrata