Package XmlManager

Examples of XmlManager.CharToRemove


     * @param str
     * @return
     */
    private String removeSpecialChars(String str) {
        // Recupero le regex da eliminare
        CharToRemove c = new CharToRemove();

        ArrayList<ArrayList> regex = c.getRegex();
        for (int j = 0; j < regex.size(); j++) {
            String oldChar = null;
            String newChar = null;
            oldChar = (String) regex.get(j).get(0);
            if (regex.get(j).size() > 1) {
                // In questo caso ho definito nell'xml con cosa sostiutire il vecchio carattere
                newChar = (String) regex.get(j).get(1);

            } else {
                // In questo caso nn ho definito l'attributo quindi devo rimuovere il carattere
                newChar = "";
            }
            str = str.replaceAll(oldChar, newChar);
        }

        // Recupero i caratteri da eliminare
        ArrayList<ArrayList> chars = c.getChars();
        for (int j = 0; j < chars.size(); j++) {
            String oldChar = null;
            String newChar = null;
            oldChar = (String) chars.get(j).get(0);
            if (chars.get(j).size() > 1) {
View Full Code Here

TOP

Related Classes of XmlManager.CharToRemove

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.