Tabnine Logo
XMLWriter.writeRaw
Code IndexAdd Tabnine to your IDE (free)

How to use
writeRaw
method
in
uk.org.ponder.xml.XMLWriter

Best Java code snippets using uk.org.ponder.xml.XMLWriter.writeRaw (Showing top 8 results out of 315)

origin: uk.org.ponder.rsf/rsf-core-ponderutilcore

public static void dumpAttribute(String name, String value, XMLWriter xmlw) {
 xmlw.writeRaw(" ").writeRaw(name).writeRaw("=\"");
 xmlw.write(value);
 xmlw.writeRaw("\"");
}
origin: uk.org.ponder.rsf/rsf-core-ponderutilcore

private void appendAttr(String attrname, Object attrvalue) {
 xmlw.writeRaw(" ");
 xmlw.writeRaw(attrname); // attribute names may not contain escapes
 xmlw.writeRaw("=\"");
 xmlw.write(mappingcontext.generalLeafParser.render(attrvalue));
 xmlw.writeRaw("\"");
}
origin: uk.org.ponder.rsf/rsf-core

public static void dumpHiddenField(UIParameter todump, XMLWriter xmlw) {
 xmlw.writeRaw("<input type=\"hidden\" ");
 boolean isvirtual = todump instanceof UIBinding && ((UIBinding)todump).virtual;
 XMLUtil.dumpAttribute(isvirtual? "id" : "name", todump.name, xmlw);
 XMLUtil.dumpAttribute("value", todump.value, xmlw);
 xmlw.writeRaw(" />\n");
}
origin: uk.org.ponder.rsf/rsf-core-ponderutilcore

public static void writeEncodeLinks(XMLWriter xmlw, String line) {
 int linkpos = line.indexOf("://");
 if (linkpos == -1) {
  xmlw.write(line);
  return;
 }
 int backpos = linkpos - 1;
 for (; backpos >= 0; --backpos) {
  if (Character.isWhitespace(line.charAt(backpos))) break;
 }
 ++ backpos;
 if (backpos == linkpos - 1) { // require non-empty protocol
  xmlw.write(line);
  return;
 }
 
 int frontpos = linkpos + 3;
 for (; frontpos < line.length(); ++ frontpos) {
  if (Character.isWhitespace(line.charAt(backpos))) break;
 }
 String url = line.substring(backpos, frontpos);
 xmlw.write(line.substring(0, backpos));
 xmlw.writeRaw("<a target=\"_top\" href=\"");
 xmlw.write(url);
 xmlw.writeRaw("\">");
 xmlw.write(url);
 xmlw.writeRaw("</a>");
 xmlw.write(line.substring(frontpos));
}
origin: sakaiproject/sakai

public int render(TagRenderContext trc) {
  if (headmatter == null) {
    return NullRewriteSCR.instance.render(trc);
  } else {
    if (RenderUtil.isFirstSCR(trc.uselump, getName())) {
      trc.xmlw.writeRaw(headmatter);
    }
    return ComponentRenderer.LEAF_TAG;
  }
}
origin: uk.org.ponder.sakairsf/sakairsf

public int render(TagRenderContext trc) {
 if (headmatter == null) {
  return NullRewriteSCR.instance.render(trc);
 }
 else {
  if (RenderUtil.isFirstSCR(trc.uselump, getName())) {
   trc.xmlw.writeRaw(headmatter);
  }
  return ComponentRenderer.LEAF_TAG;
 }
}
origin: uk.org.ponder.rsf/rsf-core-ponderutilcore

 /**
  * Copies text from input to output, converting newlines into XHTML
  * &lt;br/&gt; elements. The supplied streams WILL be closed!
  */
 public void copyReader(Reader r, PrintOutputStream pos) {
  BufferedReader br = new BufferedReader(r);
  XMLWriter xmlw = new XMLWriter(pos);
  try {
   while (true) {
    String line = br.readLine();
   
    if (line == null)
     break;
    xmlw.write(line);
// TODO: make some kind of "XMLFilterWriter" architecture if necessary        
//        writeEncodeLinks(xmlw, line);
    xmlw.writeRaw("<br/>");
   }
  }
  catch (Throwable t) {
   throw UniversalRuntimeException.accumulate(t,
     "Error rendering text as HTML");
  }
  finally {
   StreamCloseUtil.closeReader(r);
   pos.close();
  }
 }
 
origin: uk.org.ponder.rsf/rsf-core-ponderutilcore

SerialContext oldtop = getDeSAXingObject();
if (oldtop != null && !oldtop.writtenchild) {
 xmlw.writeRaw(">");
 if (indentlevel != COMPACT_MODE) {
  xmlw.writeRaw("\n");
xmlw.writeRaw("<" + childtagname, getIndent());
String genericdata = null;
if (child instanceof GenericSAX) {
 xmlw.writeRaw(">", 0);
 xmlw.writeRaw("</" + childtagname + ">\n", 0);
 top = null;
uk.org.ponder.xmlXMLWriterwriteRaw

Javadoc

Writes the supplied string to the wrapped stream without conversion.

Popular methods of XMLWriter

  • <init>
  • write
    Writes the supplied data to the wrapped stream, escaping all mandatory XML entities, being &, <, >,
  • close
    Closes this XMLWriter object, in effect flushing it and making it unusable for any further write ope
  • closeTag
  • flush
    Flushes the wrapped stream.
  • indent
  • writeDeclaration
    Writes a default declaration to the wrapped stream.
  • writeSlow

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now