out.println("<function " + (hasId() ? ("id=\"" + getId() + "\" ") : "") + (((name != null) && (name.length() > 0)) ? ("name=\"" + getName() + "\" ") : "") + "type=\"" + type + "\">");
out.println("<function " + (hasId() ? ("id=\"" + getId() + "\" ") : "") + (((name != null) && (name.length() > 0)) ? ("name=\"" + XMLUtil.encode(getName()) + "\" ") : "") + "type=\"" + type + "\">");
    public void writeXML(PrintWriter out, int indent) {        XMLUtil.printIndent(out, indent++);        out.println("<function " + (hasId() ? ("id=\"" + getId() + "\" ") : "") + (((name != null) && (name.length() > 0)) ? ("name=\"" + getName() + "\" ") : "") + "type=\"" + type + "\">");        Iterator iter = args.entrySet().iterator();        while (iter.hasNext()) {            Map.Entry entry = (Map.Entry) iter.next();            XMLUtil.printIndent(out, indent);            out.print("<arg name=\"");            out.print(entry.getKey());            out.print("\">");            if ("beanshell".equals(type) || "bsf".equals(type)) {                out.print("<![CDATA[");                out.print(entry.getValue());                out.print("]]>");            } else {                out.print(XMLUtil.encode(entry.getValue()));            }            out.println("</arg>");        }        XMLUtil.printIndent(out, --indent);        out.println("</function>");    }