--- FM2SQL/Attic/Convert.java 2004/01/08 10:31:18 1.3 +++ FM2SQL/Attic/Convert.java 2004/01/08 11:03:12 1.4 @@ -622,12 +622,10 @@ class Convert } else if (alterMe.charAt(j) == '.') { - System.out.println("dube "+alterMe); if(j==length-1) { alterMe.delete(j, j); length--; - continue; } } @@ -635,6 +633,36 @@ class Convert } return alterMe.toString(); } + public static String convertToEntities(String newName) + { + StringBuffer alterMe = new StringBuffer(newName.trim()); + int length = alterMe.length(); + int j = 0; + + while (j < length) + { + + if (alterMe.charAt(j) == '>') + { + alterMe.setCharAt(j, '&'); + alterMe.insert(j + 1, "gt;"); + length = length + 2; + if (j < length - 1) + j = j + 1; + + } else if (alterMe.charAt(j) == '<') + { + alterMe.setCharAt(j, '&'); + alterMe.insert(j + 1, "lt;"); + length = length + 2; + if (j < length - 1) + j = j + 1; + + } + ++j; + } + return alterMe.toString(); + } public static String convertUml(String newName) { StringBuffer alterMe = new StringBuffer(newName.trim()); @@ -749,7 +777,9 @@ class Convert { boolean finished = false; // parse string and build document tree - Node root = new Xparse().parse(sb.toString()); + Xparse parser =new Xparse(); + parser.changeEntities = true; + Node root = parser.parse(sb.toString()); // printContents(root); Vector databases= new Vector(); Vector tables = new Vector(); @@ -964,8 +994,10 @@ class Convert boolean finished = false; // parse string and build document tree - Node root = new Xparse().parse(sb.toString()); - // printContents(root); + Xparse parser =new Xparse(); + parser.changeEntities = true; + Node root = parser.parse(sb.toString()); + // printContents(root); Vector databases= new Vector(); Vector tables = new Vector(); Vector layouts = new Vector(); @@ -1159,7 +1191,7 @@ public static class DataBase String create=(String)creates.get(index); buffr.write(" \n"); - buffr.write(" \n"); + buffr.write(" \n"); if(!create.equals("")) buffr.write(" "+create+" \n"); buffr.write("
\n");