XmlHelper
Provides static methods for generating audit elements as well as XML serialization/deserialization.
public XmlHelper()
Deserializes the provided string.
Deserializes the provided input into a dictionary of field value
pairs made from the node names and the node contents. The input
must be XML formatted and contain a single node with a single-level
of unique XML nodes.
For example:
<data>
<field1>value</field1>
<field2>value2</field2>
</data>
Generates the XML for an audit elemen
Generates the XML for an audit element.
Creates a string representing an audit element with a corresponding audit message
public static string GenerateCollectionAwareAuditElement(string name, string subElementTag, IDictionary values)
Generates a collection aware audit element.
Reads all of the content from the provided document.
Loads a stream from an untrusted source and returns an XmlDocument. Protects against XML Bombs.
Loads a string from an untrusted source and returns an XmlDocument. Protects against XML Bombs.
Replaces strings that represent invalid XML characters from the input string with the replacement string
Will remove hex and decimal version, and is not case sensitive. All values below will be removed when preceeded by "ampersand pound" and followed by "semicolon"
Hex: 0x00-0x08, 0x0B-0x1F, x7F, 0xFFFE-0xFFFF
Decimal: 0-8, 11-31, 127, 65534-65535
Serializes the provided object.
Serializes the provided object.
Serializes the provided object.
Serializes the provided input dictionary into an XML formatted string.
Removes characters from a string that are absolutely not allowed in the XML specification, such as system characters. It will not remove or escape characters that require being escaped.