Share via


OpenXmlPartReader Class

Definition

Represents the Open XML part reader class.

public class OpenXmlPartReader : DocumentFormat.OpenXml.OpenXmlReader
type OpenXmlPartReader = class
    inherit OpenXmlReader
Public Class OpenXmlPartReader
Inherits OpenXmlReader
Inheritance
OpenXmlPartReader
Derived

Constructors

OpenXmlPartReader(OpenXmlPart, Boolean, Boolean)

Initializes a new instance of the OpenXmlPartReader class using the supplied OpenXmlPart and Boolean values.

OpenXmlPartReader(OpenXmlPart, Boolean)

Initializes a new instance of the OpenXmlPartReader class using the supplied OpenXmlPart and Boolean values.

OpenXmlPartReader(OpenXmlPart, OpenXmlPartReaderOptions)

Initializes a new instance of the OpenXmlPartReader class.

OpenXmlPartReader(OpenXmlPart)

Initializes a new instance of the OpenXmlPartReader class using the supplied OpenXmlPart class.

OpenXmlPartReader(Stream, Boolean, Boolean)
Obsolete.

Initializes a new instance of the OpenXmlPartReader class using the supplied stream and Boolean values.

OpenXmlPartReader(Stream, Boolean)
Obsolete.

Initializes a new instance of the OpenXmlPartReader class using the supplied stream and Boolean values.

OpenXmlPartReader(Stream, IFeatureCollection, OpenXmlPartReaderOptions)

Initializes a new instance of the OpenXmlPartReader class.

OpenXmlPartReader(Stream)
Obsolete.

Initializes a new instance of the OpenXmlPartReader class using the supplied stream.

Properties

Attributes

Gets the list of attributes of the current element.

Depth

Gets the depth of the current node in the XML document. The depth of the root element is 0.

ElementType

Gets the type of the corresponding strong typed class of the current element.

Encoding

Gets the encoding of the XML file.

EOF

Gets a value that indicates whether the reader is positioned at the end of the stream.

HasAttributes

Gets a value indicating whether the current node has any attributes.

(Inherited from OpenXmlReader)
IsEndElement

Gets a value that indicates whether the current node is an element end.

IsMiscNode

Gets a value that indicates whether the current node is a miscellaneous XML node (non element).

IsStartElement

Gets a value that indicates whether the current node is an element start.

LocalName

Gets the local name of the current node.

NamespaceDeclarations

Gets the namespace declarations of the current element.

NamespaceUri

Gets the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned.

Prefix

Gets the namespace prefix associated with the current node.

ReadMiscNodes

Gets a value indicating whether the OpenXmlReader will read or skip all miscellaneous nodes.

(Inherited from OpenXmlReader)
StandaloneXml

Gets the standalone property of the XML file. Returns false if there is no "standalone" in the XML declaration stream.

Methods

Close()

Closes the reader.

Dispose()

Closes the reader, and releases all resources.

(Inherited from OpenXmlReader)
Dispose(Boolean)

Closes the reader, and releases all resources.

(Inherited from OpenXmlReader)
GetLineInfo()

Gets an instance of IXmlLineInfo if available for the current reader.

GetLineInfo()

Gets an instance of IXmlLineInfo if available for the current reader.

(Inherited from OpenXmlReader)
GetText()

Gets the text of the element if the element is an OpenXmlLeafTextElement. Returns String.Empty for other elements.

LoadCurrentElement()

Loads the element at the current cursor.

Read()

Moves to read the next element.

ReadFirstChild()

Moves to read the first child element.

ReadNextSibling()

Moves to read the next sibling element.

Skip()

Skips the child elements of the current node.

ThrowIfObjectDisposed()

Thrown if the object is disposed.

(Inherited from OpenXmlReader)

Applies to