The rules for defining a properly constructed XML name are defined here.
C# has a utility method to convert strings into a valid XML name: XmlConvert.EncodeName.
What is the Java equivalent of this utility method?
Note: XML names must begin with a letter, _, or : character. After the first character, be composed only of letters, digits, ., -, _, and : characters.