ForElementAttribute Class

Marks a class to be bound to the XML element.

C#
[AttributeUsage(System.AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class ForElementAttribute : Attribute
Inheritance
ForElementAttribute
Attributes

Remarks

The ForElementAttribute associates a class with an XML element name and namespace. Use an empty string ("") for ns to specify the null namespace (no namespace).

Multiple classes can be mapped to the same element name, as Oxbind determines the correct mapping contextually based on the constructor parameter order.

Constructors

ForElementAttribute(string, string)

Marks a class to be bound to the XML element.

Properties

QName

Gets the qualified name of the element.

TypeId (Inherited from Attribute)

Methods

Equals(object) (Inherited from Attribute)
GetHashCode() (Inherited from Attribute)
IsDefaultAttribute() (Inherited from Attribute)
Match(object) (Inherited from Attribute)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

ForElementAttribute(string, string)

Marks a class to be bound to the XML element.

C#
public ForElementAttribute(string name, [string ns = ""])

Parameters

name
string

The element name.

ns
string

The namespace URI. Use an empty string ("") to specify the null namespace (no namespace).

Remarks

The ForElementAttribute associates a class with an XML element name and namespace. Use an empty string ("") for ns to specify the null namespace (no namespace).

Multiple classes can be mapped to the same element name, as Oxbind determines the correct mapping contextually based on the constructor parameter order.

Properties Detail

QName

Gets the qualified name of the element.

C#
public XmlQualifiedName QName { get; }

Property Value