NanoXLSX.Core 3.1.0
Loading...
Searching...
No Matches
NanoXLSX.Utils.Xml.XmlStreamUtils Class Reference

Static utility class providing helpers for forward-only XmlReader-based (SAX-style) parsing, used by all reader plug-ins to avoid XmlDocument DOM allocations. More...

Static Public Member Functions

static XmlReaderSettings CreateSettings ()
 Creates standardized XmlReaderSettings for all reader plug-ins: XmlResolver=null (security), whitespace/comment/PI nodes suppressed.
static bool IsElement (XmlReader reader, string localName)
 Returns true when the reader is positioned on a start element whose LocalName matches localName (OrdinalIgnoreCase).
static string ReadElementText (XmlReader reader)
 Reads the string content of a simple leaf element (one that contains only text, no child elements). Leaves the reader positioned after the end element. Returns an empty string if the element is empty.

Detailed Description

Static utility class providing helpers for forward-only XmlReader-based (SAX-style) parsing, used by all reader plug-ins to avoid XmlDocument DOM allocations.

Definition at line 17 of file XmlStreamUtils.cs.

Member Function Documentation

◆ CreateSettings()

XmlReaderSettings NanoXLSX.Utils.Xml.XmlStreamUtils.CreateSettings ( )
static

Creates standardized XmlReaderSettings for all reader plug-ins: XmlResolver=null (security), whitespace/comment/PI nodes suppressed.

Definition at line 23 of file XmlStreamUtils.cs.

◆ IsElement()

bool NanoXLSX.Utils.Xml.XmlStreamUtils.IsElement ( XmlReader reader,
string localName )
static

Returns true when the reader is positioned on a start element whose LocalName matches localName (OrdinalIgnoreCase).

Definition at line 38 of file XmlStreamUtils.cs.

◆ ReadElementText()

string NanoXLSX.Utils.Xml.XmlStreamUtils.ReadElementText ( XmlReader reader)
static

Reads the string content of a simple leaf element (one that contains only text, no child elements). Leaves the reader positioned after the end element. Returns an empty string if the element is empty.

Definition at line 49 of file XmlStreamUtils.cs.


The documentation for this class was generated from the following file: