OpenXmlElement Members

Include Protected Members
Include Inherited Members

Defines the OpenXmlElement - base class for all elements in Open XML document. Defines the OpenXmlElement - base class for all elements in Open XML document.

The OpenXmlElement type exposes the following members.

Constructors

  Name Description
Protected method OpenXmlElement() Initializes a new instance of the OpenXmlElement.
Protected method OpenXmlElement(String) Initializes a new instance of the OpenXmlElement.

Top

Properties

  Name Description
Public property ChildElements Gets all the child nodes of this element.
Public property ExtendedAttributes Gets all extended attributes (attributes not defined in schema) of the element.
Public property FirstChild Gets the first child of the OpenXmlElement. If there is no such OpenXmlElement, a null reference (Nothing in Visual Basic) is returned.
Public property HasAttributes Gets a boolean value indicating whether the current element has any attributes.
Public property HasChildren Gets a value indicating whether this element has any child elements.
Public property InnerText Gets the concatenated values of the node and all its children.
Public property InnerXml Gets or sets the markup representing only the child nodes of this node.
Public property LastChild Gets the last child of the OpenXmlElement. If there is no such OpenXmlElement, a null reference (Nothing in Visual Basic) is returned.
Public property LocalName Gets the local name of the node.
Public property MCAttributes Markup Compatibility Attributes Set. Return null if there is no Markup Compatibility Attribute defined in this element.
Public property NamespaceDeclarations Gets all the namespace declarations defined in the current element. Return an empty enumerator if there is no namespace declaration.
Public property NamespaceUri Gets the namespace URI of this node.
Public property OpenXmlElementContext Gets the OpenXmlEementContext.
Public property OuterXml Gets the markup representing this element and all its child elements.
Public property Parent Gets the parent of this element.
Public property Prefix Gets the namespace prefix of this node.
Public property XmlQualifiedName Gets the qualified name of the node.

Top

Methods

  Name Description
Public method AddAnnotation Adds an object to the annotation list of this OpenXmlElement.
Public method AddNamespaceDeclaration Adds a namepace declaration to the current node.
Public method Ancestors() Enumerate all the ancestor nodes of this element.
Public method Ancestors<T>() Enumerate for specific type of elements in ancestor elements
Public method Annotation(Type) Get the first annotation object of the specified type from this OpenXmlElement.
Public method Annotation<T>() Get the first annotation object of the specified type from this OpenXmlElement.
Public method Annotations(Type) Gets a collection of annotations of the specified type for this OpenXmlElement.
Public method Annotations<T>() Gets a collection of annotations of the specified type for this OpenXmlElement.
Public method Append(array<OpenXmlElement[]) Adds the elements to the end of the list of child nodes, of this element.
Public method Append(IEnumerable<OpenXmlElement>) Adds the elements to the end of the list of child nodes, of this element.
Public method AppendChild<T> Adds the specified element to the end of the list of child nodes, of this element.
Public method ClearAllAttributes Clear all the attributes ( known attributes + extended attributes )
Public method Clone Creates a duplicate of this node.
Public method CloneNode When overridden in a derived class, creates a duplicate of the node.
Public method Descendants() Enumerate all the descendants elements of this element. Preorder traversering.
Public method Descendants<T>() Enumerate all the descendants elements (which type is T) of this element. Preorder traversering.
Public method Elements() Enumerate all the child nodes of this element.
Public method Elements<T>() Enumerate for specific type of elements in child elements
Public method ElementsAfter Enumerate all the sibling elements after this element in same parent.
Public method ElementsBefore Enumerate all the sibling elements before this element in same parent.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetAttribute Gets a Open XML attribute with the specifed tag name and namespace URI.
Public method GetAttributes Get a copy of all the attributes
Public method GetEnumerator Returns an enumerator that iterates through the child collection.
Public method GetFirstChild<T> Find the first child element in type T
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method InsertAfter<T> Inserts the specified element immediately after the specified reference element.
Public method InsertAfterSelf<T> Inserts the specified element immediately after this element.
Public method InsertAt<T> Inserts the specified element at the specified index in children.
Public method InsertBefore<T> Inserts the specified element immediately before the specified reference element.
Public method InsertBeforeSelf<T> Inserts the specified element immediately before this element.
Public method IsAfter Determines if the current element appears after a specified element in document order.
Public method IsBefore Determines if the current element appears before a specified element in document order.
Public method LookupNamespace Resolve the namespace prefix in the context of current node
Public method LookupPrefix Finds the corresponding prefix for a namespace uri in the current element scope.
Protected method MemberwiseClone (Inherited from Object.)
Public method NextSibling() Gets the OpenXmlElement immediately following this OpenXmlElement. If there is no next OpenXmlElement, a null reference (Nothing in Visual Basic) is returned.
Public method NextSibling<T>() Gets the specified type OpenXmlElement following this OpenXmlElement. If there is no such following OpenXmlElement, a null reference (Nothing in Visual Basic) is returned.
Public method PrependChild<T> Adds the specified element to the beginning of the list of child nodes for this element.
Public method PreviousSibling() Gets the OpenXmlElement immediately preceding this OpenXmlElement. If there is no such preceding OpenXmlElement, a null reference (Nothing in Visual Basic) is returned.
Public method PreviousSibling<T>() Gets the specified type OpenXmlElement preceding this OpenXmlElement. If there is no preceding OpenXmlElement, a null reference (Nothing in Visual Basic) is returned.
Public method Remove Removes this element from its parent.
Public method RemoveAllChildren() Remove all the child elements.
Public method RemoveAllChildren<T>() Remove all the child elements which type is T.
Public method RemoveAnnotations(Type) Removes the annotations of the specified type from this OpenXmlElement.
Public method RemoveAnnotations<T>() Removes the annotations of the specified type from this OpenXmlElement.
Public method RemoveAttribute Remove the attribute from the element.
Public method RemoveChild<T> Removes specified child element.
Public method RemoveNamespaceDeclaration Removes namespace declaration for a specific prefix. do nothing if the prefix is not existed.
Public method ReplaceChild<T> Replaces the child OpenXmlElement oldChild with newChild OpenXmlElement.
Public method SetAttribute Set an attribute to the element. If the attribute is a known attribute, the value of the attribute is set. If the attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.
Public method SetAttributes Set a bunch of attributes to the element. If a attribute is a known attribute, the value of the attribute is set. If a attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.
Public method ToString (Inherited from Object.)
Public method WriteTo Saves the current node to the specified XmlWriter.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator

Top

See Also

Reference

OpenXmlElement Class

DocumentFormat.OpenXml Namespace