NanoXLSX.Core 3.0.0-rc.3
Loading...
Searching...
No Matches
NanoXLSX.Utils.Xml.XmlUtils Class Reference

Class providing static methods to manipulate XML during packing or unpacking. More...

Static Public Member Functions

static string SanitizeXmlValue (string input)
 Method to sanitize XML string values between two XML tags or in an attribute. Not considered are '<', '>' and '&' since these characters are automatically escaped on writing XML.

Detailed Description

Class providing static methods to manipulate XML during packing or unpacking.

Remarks
Methods in this class should only be used by the library components and not called by user code

Definition at line 17 of file XmlUtils.cs.

Member Function Documentation

◆ SanitizeXmlValue()

string NanoXLSX.Utils.Xml.XmlUtils.SanitizeXmlValue ( string input)
static

Method to sanitize XML string values between two XML tags or in an attribute. Not considered are '<', '>' and '&' since these characters are automatically escaped on writing XML.

Parameters
inputInput string to process
Returns
Escaped string
Remarks
Note: The XML specs allow characters up to the character value of 0x10FFFF. However, the C# char range is only up to 0xFFFF. NanoXLSX will neglect all values above this level in the sanitizing check. Illegal characters like 0x1 will be replaced with a white space (0x20)

Definition at line 25 of file XmlUtils.cs.


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