Utility function that removes all non-alphanumeric and '.', ':', '-', '_' characters from a string and returns just the numbers, letters and this spec characters, Prepends with underscore if the identifier starts with a number or '.' or'-'. This is used for converting text valid XML tags and attributes.
Syntax
'Declaration
Public Shared Function NormalizeXmlIdentifier( _
ByVal As String _
) As String
'Usage
Dim stringIN As String
Dim value As String
value = Utils.NormalizeXmlIdentifier(stringIN)
public static string NormalizeXmlIdentifier(
string
)
public function NormalizeXmlIdentifier(
: String
): String; static;
public static function NormalizeXmlIdentifier(
: String
) : String;
public: static string* NormalizeXmlIdentifier(
string*
)
public:
static String^ NormalizeXmlIdentifier(
String^
)
Parameters
- stringIN
- The string IN.
Return Value
String containing only the alphanumeric characters and underscores from the input string
See Also