NanoXLSX.Core 3.2.1
Loading...
Searching...
No Matches
NanoXLSX.Utils.Xml.XmlElement Class Reference

Class representing an internally used XML element / node. More...

Public Member Functions

XmlDocument TransformToDocument ()
 Transforms this custom XmlElement (and its children) into a standard XmlDocument.
IEnumerable< XmlElement > FindChildElementsByName (string name)
 Method to find XML child elements, based of its name. Name space and hierarchy is not considered as exclusion parameters.
IEnumerable< XmlElement > FindChildElementsByNameAndAttribute (string elementName, string attributeName)
 Method to find XML child elements, based of its name, an attribute name. Name space and hierarchy is not considered as exclusion parameters.
IEnumerable< XmlElement > FindChildElementsByNameAndAttribute (string elementName, string attributeName, string attributeValue)
 Method to find XML child elements, based of its name, an attribute name and value. Name space and hierarchy is not considered as exclusion parameters.

Properties

string Prefix [get, set]
 Prefix of the element. If not defined, the prefix will be an empty string.
string Name [get]
 Name of the element (without prefix).
List< XmlElement > Children [get]
 List of child elements. If none, the list is null.
HashSet< XmlAttributeAttributes [get]
 List of attributes of this element. If none, the list is null.
Dictionary< string, string > PrefixNameSpaceMap [get]
 Map of prefixes and corresponding name space URIs of this element.
string InnerValue [get, set]
 Gets or set the inner value of the element.

Detailed Description

Class representing an internally used XML element / node.

Definition at line 18 of file XmlElement.cs.

Member Function Documentation

◆ FindChildElementsByName()

IEnumerable< XmlElement > NanoXLSX.Utils.Xml.XmlElement.FindChildElementsByName ( string name)

Method to find XML child elements, based of its name. Name space and hierarchy is not considered as exclusion parameters.

Parameters
nameName of the target element or elements
Returns
IEnumerable of XML element. If no element was found, an empty IEnumerable will be returned

Definition at line 448 of file XmlElement.cs.

◆ FindChildElementsByNameAndAttribute() [1/2]

IEnumerable< XmlElement > NanoXLSX.Utils.Xml.XmlElement.FindChildElementsByNameAndAttribute ( string elementName,
string attributeName )

Method to find XML child elements, based of its name, an attribute name. Name space and hierarchy is not considered as exclusion parameters.

Parameters
elementNameName of the target element or elements
attributeNameName of the target attribute, present in the XML element
Returns
IEnumerable of XML element. If no element was found, an empty IEnumerable will be returned

Definition at line 472 of file XmlElement.cs.

◆ FindChildElementsByNameAndAttribute() [2/2]

IEnumerable< XmlElement > NanoXLSX.Utils.Xml.XmlElement.FindChildElementsByNameAndAttribute ( string elementName,
string attributeName,
string attributeValue )

Method to find XML child elements, based of its name, an attribute name and value. Name space and hierarchy is not considered as exclusion parameters.

Parameters
elementNameName of the target element or elements
attributeNameName of the target attribute, present in the XML element
attributeValueValue of the XML attribute, present in the XML element
Returns
IEnumerable of XML element. If no element was found, an empty IEnumerable will be returned

Definition at line 484 of file XmlElement.cs.

◆ TransformToDocument()

XmlDocument NanoXLSX.Utils.Xml.XmlElement.TransformToDocument ( )

Transforms this custom XmlElement (and its children) into a standard XmlDocument.

Returns
A new XmlDocument representing the hierarchical XML structure.

Definition at line 319 of file XmlElement.cs.

Property Documentation

◆ Attributes

HashSet<XmlAttribute> NanoXLSX.Utils.Xml.XmlElement.Attributes
get

List of attributes of this element. If none, the list is null.

Definition at line 44 of file XmlElement.cs.

◆ Children

List<XmlElement> NanoXLSX.Utils.Xml.XmlElement.Children
get

List of child elements. If none, the list is null.

Definition at line 40 of file XmlElement.cs.

◆ InnerValue

string NanoXLSX.Utils.Xml.XmlElement.InnerValue
getset

Gets or set the inner value of the element.

Definition at line 53 of file XmlElement.cs.

◆ Name

string NanoXLSX.Utils.Xml.XmlElement.Name
get

Name of the element (without prefix).

Definition at line 36 of file XmlElement.cs.

◆ Prefix

string NanoXLSX.Utils.Xml.XmlElement.Prefix
getset

Prefix of the element. If not defined, the prefix will be an empty string.

Definition at line 32 of file XmlElement.cs.

◆ PrefixNameSpaceMap

Dictionary<string, string> NanoXLSX.Utils.Xml.XmlElement.PrefixNameSpaceMap
get

Map of prefixes and corresponding name space URIs of this element.

Definition at line 48 of file XmlElement.cs.


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