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

XmlTextAttribute — System.Xml.Serialization (system.xml.dll) CF 1.0  class 

Synopsis

public class XmlTextAttribute : Attribute {
// Public Constructors
   public XmlTextAttribute( );  
   public XmlTextAttribute( Type type);  
// Public Instance Properties
   public string DataType{set; get; } 
   public Type Type{set; get; } 
}

This type is used to indicate that the member should be serialized to XML as text. Only one member per class can be serialized as text. The member to which XmlTextAttribute is applied must return a primitive or enumeration type, a System.Xml.XmlNode, an array of System.Strings, or an array of System.Objects, the latter only if the individual array elements are of one of the former types. The DataType property determines the XML Schema type serialized, and the Type property determines the System.Type of the member.

Hierarchy

System.ObjectSystem.AttributeXmlTextAttribute

Valid On

Property, Field, Parameter, ReturnValue

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