Class Element
Represents an XML element in an AML structure. This element could be an Item, property, result tag, or something else
Inheritance
Inherited Members
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public abstract class Element : IElement, IReadOnlyElement, IAmlNode, ILinkedElement, ILink<ILinkedElement>
Constructors
| Improve this Doc View SourceElement()
Initializes a new instance of the Element class.
Declaration
public Element()
Fields
| Improve this Doc View Source_attr
Field containing a reference to the element attributes
Declaration
protected ElementAttributes _attr
Field Value
Type | Description |
---|---|
ElementAttributes |
_content
Field containing the element content (either a child IElement or the value)
Declaration
protected object _content
Field Value
Type | Description |
---|---|
System.Object |
Properties
| Improve this Doc View SourceAmlContext
Retrieve the context used for rendering primitive values
Declaration
public virtual ElementFactory AmlContext { get; }
Property Value
Type | Description |
---|---|
ElementFactory |
Implements
| Improve this Doc View SourceExists
Returns true
if this element actually exists in the underlying AML,
otherwise, returns false
to indicate that the element is just a null placeholder
put in place to reduce unnecessary null reference checks
Declaration
public virtual bool Exists { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceName
Local XML name of the element
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
| Improve this Doc View SourceNext
The next sibling AML element (if any)
Declaration
public abstract ILinkedElement Next { get; set; }
Property Value
Type | Description |
---|---|
ILinkedElement |
Implements
| Improve this Doc View SourceParent
Retrieve the parent element
Declaration
public abstract IElement Parent { get; set; }
Property Value
Type | Description |
---|---|
IElement |
Implements
| Improve this Doc View SourceReadOnly
Indicates if the element is read only
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Value
String value of the element
Declaration
public virtual string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Methods
| Improve this Doc View SourceAdd(Object)
Add new content to the element
Declaration
public virtual IElement Add(object content)
Parameters
Type | Name | Description |
---|---|---|
System.Object | content |
Returns
Type | Description |
---|---|
IElement |
Implements
| Improve this Doc View SourceAssertModifiable()
Asserts that the element is modifiable modifiable.
Declaration
protected void AssertModifiable()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | If the user attempts to modify a read only element |
Attribute(String)
Retrieve the attribute with the specified name
Declaration
public IAttribute Attribute(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
IAttribute |
Implements
| Improve this Doc View SourceAttributes()
Retrieve all attributes specified for the element
Declaration
public IEnumerable<IAttribute> Attributes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IAttribute> |
Implements
| Improve this Doc View SourceClone(IElement)
Clones the element, specifying a new parent.
Declaration
protected virtual Element Clone(IElement newParent)
Parameters
Type | Name | Description |
---|---|---|
IElement | newParent | The new parent. |
Returns
Type | Description |
---|---|
Element | A copy of the element |
CopyData(IReadOnlyElement)
Copies data from elem
into this instance.
Declaration
protected void CopyData(IReadOnlyElement elem)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyElement | elem | The elem to copy from. |
Elements()
Retrieve all child elements
Declaration
public virtual IEnumerable<IElement> Elements()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IElement> |
Implements
| Improve this Doc View SourceRemove()
Remove the element from its parent
Declaration
public void Remove()
Implements
| Improve this Doc View SourceRemoveAttributes()
Remove attributes from the element
Declaration
public void RemoveAttributes()
Implements
| Improve this Doc View SourceRemoveNodes()
Remove child nodes from the element
Declaration
public void RemoveNodes()
Implements
| Improve this Doc View SourceToAml(XmlWriter, AmlWriterSettings)
Write the node to the specified System.Xml.XmlWriter
Declaration
public void ToAml(XmlWriter writer, AmlWriterSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | System.Xml.XmlWriter to write the node to |
AmlWriterSettings | settings | Settings controlling how the node is written |
Implements
| Improve this Doc View SourceToString()
Returns a System.String that has the AML of the element.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that has the AML of the element. |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceILinkedElement.Parent
Retrieve the parent element
Declaration
IReadOnlyElement ILinkedElement.Parent { get; set; }
Returns
Type | Description |
---|---|
IReadOnlyElement |
Implements
| Improve this Doc View SourceIReadOnlyElement.Attribute(String)
Declaration
IReadOnlyAttribute IReadOnlyElement.Attribute(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
IReadOnlyAttribute |
Implements
| Improve this Doc View SourceIReadOnlyElement.Attributes()
Declaration
IEnumerable<IReadOnlyAttribute> IReadOnlyElement.Attributes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IReadOnlyAttribute> |
Implements
| Improve this Doc View SourceIReadOnlyElement.Elements()
Declaration
IEnumerable<IReadOnlyElement> IReadOnlyElement.Elements()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IReadOnlyElement> |
Implements
| Improve this Doc View SourceIReadOnlyElement.Parent
Retrieve the parent element
Declaration
IReadOnlyElement IReadOnlyElement.Parent { get; }
Returns
Type | Description |
---|---|
IReadOnlyElement |