Пример #1
0
 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));
 }
Пример #2
0
 /* (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();
 }
Пример #3
0
 /* (non-Javadoc)
  * @see org.eclipse.ohf.utilities.xml.IXMLWriter#cData(java.lang.String)
  */
 @Override
 public void cData(String text) throws IOException {
   text("<![CDATA[" + text + "]]>");
 }
Пример #4
0
 /* (non-Javadoc)
  * @see org.eclipse.ohf.utilities.xml.IXMLWriter#text(java.lang.String)
  */
 @Override
 public void text(String content) throws IOException {
   text(content, false);
 }