public void escapedText(String content) throws IOException { text(""); int i = content.length(); if (isPretty()) while (i > 0 && (content.charAt(i - 1) == '\r' || content.charAt(i - 1) == '\n')) i--; write(content.substring(0, i)); }
/* (non-Javadoc) * @see org.eclipse.ohf.utilities.xml.IXMLWriter#element(java.lang.String, java.lang.String, java.lang.String) */ @Override public void element(String namespace, String name, String content) throws IOException { if (!XMLUtil.isNMToken(name)) throw new IOException("XML name " + name + " is not valid"); open(namespace, name); text(content); close(); }
/* (non-Javadoc) * @see org.eclipse.ohf.utilities.xml.IXMLWriter#cData(java.lang.String) */ @Override public void cData(String text) throws IOException { text("<![CDATA[" + text + "]]>"); }
/* (non-Javadoc) * @see org.eclipse.ohf.utilities.xml.IXMLWriter#text(java.lang.String) */ @Override public void text(String content) throws IOException { text(content, false); }