SanitizeXmlElementName Method
Definition
- Assemblies
- Cuemon.Xml.dll
SanitizeXmlElementName(IDecorator<string>)
Sanitizes the enclosed string of the specified decorator for any invalid characters.
public static string SanitizeXmlElementName(this IDecorator<string> decorator)
Parameters
decoratorIDecorator<string>The IDecorator<T> to extend.
Returns
Remarks
Sanitation rules are as follows:
1. Names can contain letters, numbers, and these 4 characters: _ | : | . | -
2. Names cannot start with a number or punctuation character
3. Names cannot contain spaces
Exceptions
- ArgumentNullException
decoratorcannot be null.