This topic has not yet been rated - Rate this topic

XmlElementAttribute.ElementName Property

April 12, 2014

Gets or sets the name of the generated XML element.

Namespace:  System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)
'Declaration
Public Property ElementName As String

Property Value

Type: System.String
The name of the generated XML element. The default is the member identifier.

Specify an ElementName if you want the name of the generated XML element to differ from the member's identifier.

You can set the same ElementName value to more than one class member if the generated XML document uses XML namespaces to distinguish between the identically named members.

For more information about

how to use namespaces and prefixed names in the XML document, see the XmlSerializerNamespaces class.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.