ForElementAttribute Class
Marks a class to be bound to the XML element.
[AttributeUsage(System.AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class ForElementAttribute : Attribute
- Inheritance
- 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
For |
Marks a class to be bound to the XML element. |
Properties
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.
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.
public XmlQualifiedName QName { get; }