Click or drag to resize

OpenXmlReader Class

Represents the Open XML reader class.
Inheritance Hierarchy

Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.20.0+Branch.release-v2.20.0.Sha.a873d3fbff9bffe179fea62486da950adf5be65d.a873d3fbff9bffe179fea62486da950adf5be65d
Syntax
public abstract class OpenXmlReader : IDisposable

The OpenXmlReader type exposes the following members.

Properties
 NameDescription
Public propertyAttributes Gets the list of attributes of the current element.
Public propertyDepth Gets the depth of the current node in the XML document. The depth of the root element is 0.
Public propertyElementType Gets the type of the corresponding strongly typed class of the current element.
Public propertyEncoding Gets the encoding of the XML file.
Public propertyEOF Gets a value indicating whether the reader is positioned at the end of the stream.
Public propertyHasAttributes Gets a value indicating whether the current node has any attributes.
Public propertyIsEndElement Gets a value indicating whether the current node is an element end.
Public propertyIsMiscNode Gets a value indicating whether the current node is a miscellaneous XML node (non element).
Public propertyIsStartElement Gets a value indicating whether the current node is an element start.
Public propertyLocalName Gets the local name of the current node.
Public propertyNamespaceDeclarations Gets the namespace declarations of the current element.
Public propertyNamespaceUri Gets the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned.
Public propertyPrefix Gets the namespace prefix associated with the current node.
Public propertyReadMiscNodes Gets a value indicating whether the OpenXmlReader will read or skip all miscellaneous nodes.
Public propertyStandaloneXml Gets the standalone property in the XML declaration of the XML stream. The default value is null.
Top
Methods
 NameDescription
Public methodClose Closes the reader.
Public methodStatic memberCreate(OpenXmlElement) Creates an OpenXmlReader from the OpenXmlElement (travel the DOM tree).
Public methodStatic memberCreate(OpenXmlPart) Creates an OpenXmlReader from the specified OpenXmlPart.
Public methodStatic memberCreate(Stream) Creates an OpenXmlReader from the specified part stream.
Obsolete
Public methodStatic memberCreate(OpenXmlElement, Boolean) Creates an OpenXmlReader from the OpenXmlElement (travel the DOM tree).
Public methodStatic memberCreate(OpenXmlPart, Boolean) Creates an OpenXmlReader from the specified OpenXmlPart and Boolean values.
Public methodStatic memberCreate(Stream, Boolean) Creates an OpenXmlReader from the specified part stream and Boolean values.
Obsolete
Public methodStatic memberCreate(OpenXmlPart, Boolean, Boolean) Creates an OpenXmlReader from the specified OpenXmlPart and Boolean values.
Public methodStatic memberCreate(Stream, Boolean, Boolean) Creates an OpenXmlReader from the specified part stream and Boolean values.
Obsolete
Public methodDispose Closes the reader, and releases all resources.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetLineInfo Gets an instance of IXmlLineInfo if available for the current reader.
Public methodGetText Gets the text of the element if the element is an OpenXmlLeafTextElement. Returns String.Empty for other elements.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodLoadCurrentElement Loads the element at current cursor.
Public methodRead Moves to read the next element.
Public methodReadFirstChild Moves to read the first child element.
Public methodReadNextSibling Moves to read the next sibling element.
Public methodSkip Skips the child elements of the current node.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also