NanoXLSX.Reader 3.0.0-rc.2
Loading...
Searching...
No Matches
NanoXLSX.Internal.ReaderUtils Class Reference

Static class with common util methods, used during reading XLSX files. More...

Static Public Member Functions

static string GetAttribute (XmlNode node, string targetName, string fallbackValue=null)
 Gets the XML attribute of the passed XML node by its name.
static bool GetAttributeOfChild (XmlNode node, string childNodeName, string attributeName, out string output)
 Gets the XML attribute from a child node of the passed XML node by its name and the name of the child node. This method simplifies the process of gathering one single child node attribute.
static XmlNode GetChildNode (XmlNode node, string name)
 Gets the specified child node.

Detailed Description

Static class with common util methods, used during reading XLSX files.

Definition at line 17 of file ReaderUtils.cs.

Member Function Documentation

◆ GetAttribute()

string NanoXLSX.Internal.ReaderUtils.GetAttribute ( XmlNode node,
string targetName,
string fallbackValue = null )
static

Gets the XML attribute of the passed XML node by its name.

Parameters
nodeXML node that contains the attribute
targetNameName of the target attribute
fallbackValueOptional fallback value if the attribute was not found. Default is null
Returns
Attribute value as string or default value if not found (can be null)

Definition at line 26 of file ReaderUtils.cs.

◆ GetAttributeOfChild()

bool NanoXLSX.Internal.ReaderUtils.GetAttributeOfChild ( XmlNode node,
string childNodeName,
string attributeName,
out string output )
static

Gets the XML attribute from a child node of the passed XML node by its name and the name of the child node. This method simplifies the process of gathering one single child node attribute.

Parameters
nodeXML node that contains the child node
childNodeNameName of the child node
attributeNameName of the attribute in the child node
outputValue of the attribute as string or null if not found
Returns
True if found, otherwise false

Definition at line 53 of file ReaderUtils.cs.

◆ GetChildNode()

XmlNode NanoXLSX.Internal.ReaderUtils.GetChildNode ( XmlNode node,
string name )
static

Gets the specified child node.

Parameters
nodeXML node that contains child node
nameName of the child node
Returns
Child node or null if not found

Definition at line 71 of file ReaderUtils.cs.


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