code: private String escapeAttributeNameSpecialCharacters(String str)
      {
          if (str != null)
          {
              StringBuffer strBuf = new StringBuffer("");
  
              for (int i = 0; i < str.length(); i++)
              {
                  char strChar = str.charAt(i);
  
                  switch (strChar)
                  {
                      case ':':
                          {
                              strBuf.append("_ns-sep_");
                              break;
                          }
                      default:
                          {
                              strBuf.append(strChar);
                              break;
                          }
                  }
              }
              str = strBuf.toString();
          }
          return str;
      }
docs: Internal method to escape special attribute name characters, to handle things like name spaces.
  @param str The string to escape the characters in.