Tabnine Logo
SAXText.getType
Code IndexAdd Tabnine to your IDE (free)

How to use
getType
method
in
org.milyn.delivery.sax.SAXText

Best Java code snippets using org.milyn.delivery.sax.SAXText.getType (Showing top 8 results out of 315)

origin: org.milyn/milyn-smooks-core

@SuppressWarnings("RedundantThrows")
public void onChildText(SAXElement element, SAXText childText, ExecutionContext executionContext) throws SmooksException, IOException {
  if(currentNode == document) {
    // Just ignore for now...
    return;
  }
  if(childText.getText().trim().length() == 0) {
    // Ignore pure whitespace...
    return;
  }
  switch (childText.getType()) {
    case TEXT:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
    case CDATA:
      currentNode.appendChild(document.createCDATASection(childText.getText()));
      break;
    case COMMENT:
      currentNode.appendChild(document.createComment(childText.getText()));
      break;
    case ENTITY:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
  }
}
origin: smooks/smooks

@SuppressWarnings("RedundantThrows")
public void onChildText(SAXElement element, SAXText childText, ExecutionContext executionContext) throws SmooksException, IOException {
  if(currentNode == document) {
    // Just ignore for now...
    return;
  }
  if(childText.getText().trim().length() == 0) {
    // Ignore pure whitespace...
    return;
  }
  switch (childText.getType()) {
    case TEXT:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
    case CDATA:
      currentNode.appendChild(document.createCDATASection(childText.getText()));
      break;
    case COMMENT:
      currentNode.appendChild(document.createComment(childText.getText()));
      break;
    case ENTITY:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
  }
}
origin: org.virtuslab/milyn-smooks-core

public void onChildText(SAXElement element, SAXText childText, ExecutionContext executionContext) throws SmooksException, IOException {
  if(currentNode == document) {
    // Just ignore for now...
    return;
  }
  if(childText.getText().trim().length() == 0) {
    // Ignore pure whitespace...
    return;
  }
  switch (childText.getType()) {
    case TEXT:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
    case CDATA:
      currentNode.appendChild(document.createCDATASection(childText.getText()));
      break;
    case COMMENT:
      currentNode.appendChild(document.createComment(childText.getText()));
      break;
    case ENTITY:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
  }
}
origin: org.milyn/milyn-smooks-all

@SuppressWarnings("RedundantThrows")
public void onChildText(SAXElement element, SAXText childText, ExecutionContext executionContext) throws SmooksException, IOException {
  if(currentNode == document) {
    // Just ignore for now...
    return;
  }
  if(childText.getText().trim().length() == 0) {
    // Ignore pure whitespace...
    return;
  }
  switch (childText.getType()) {
    case TEXT:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
    case CDATA:
      currentNode.appendChild(document.createCDATASection(childText.getText()));
      break;
    case COMMENT:
      currentNode.appendChild(document.createComment(childText.getText()));
      break;
    case ENTITY:
      currentNode.appendChild(document.createTextNode(childText.getText()));
      break;
  }
}
origin: org.milyn/milyn-smooks-core

public static void writeText(SAXText text, Writer writer) throws IOException {
  if(writer != null) {
    switch (text.getType()) {
      case TEXT:
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        break;
      case CDATA:
        writer.write("<![CDATA[");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("]]>");
        break;
      case COMMENT:
        writer.write("<!--");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("-->");
        break;
      case ENTITY:
        writer.write("&");
        writer.write(HTMLEntityLookup.getEntityRef(text.getCharacters()[text.getOffset()]));
        writer.write(';');
        break;
    }
  }
}
origin: smooks/smooks

public static void writeText(SAXText text, Writer writer) throws IOException {
  if(writer != null) {
    switch (text.getType()) {
      case TEXT:
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        break;
      case CDATA:
        writer.write("<![CDATA[");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("]]>");
        break;
      case COMMENT:
        writer.write("<!--");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("-->");
        break;
      case ENTITY:
        writer.write("&");
        writer.write(HTMLEntityLookup.getEntityRef(text.getCharacters()[text.getOffset()]));
        writer.write(';');
        break;
    }
  }
}
origin: org.milyn/milyn-smooks-all

public static void writeText(SAXText text, Writer writer) throws IOException {
  if(writer != null) {
    switch (text.getType()) {
      case TEXT:
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        break;
      case CDATA:
        writer.write("<![CDATA[");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("]]>");
        break;
      case COMMENT:
        writer.write("<!--");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("-->");
        break;
      case ENTITY:
        writer.write("&");
        writer.write(HTMLEntityLookup.getEntityRef(text.getCharacters()[text.getOffset()]));
        writer.write(';');
        break;
    }
  }
}
origin: org.virtuslab/milyn-smooks-core

public static void writeText(SAXText text, Writer writer) throws IOException {
  if(writer != null) {
    switch (text.getType()) {
      case TEXT:
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        break;
      case CDATA:
        writer.write("<![CDATA[");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("]]>");
        break;
      case COMMENT:
        writer.write("<!--");
        writer.write(text.getCharacters(), text.getOffset(), text.getLength());
        writer.write("-->");
        break;
      case ENTITY:
        writer.write("&");
        writer.write(HTMLEntityLookup.getEntityRef(text.getCharacters()[text.getOffset()]));
        writer.write(';');
        break;
    }
  }
}
org.milyn.delivery.saxSAXTextgetType

Javadoc

Get the text type (comment, cdata etc).

Popular methods of SAXText

  • <init>
  • clone
    Clone this SAXText object.
  • getCharacters
    Get the underlying character buffer.
  • getLength
    Get the character buffer length (in the #getCharacters()) of the text a associated with this SAXText
  • getOffset
    Get the character offset (in the #getCharacters()) of the text a associated with this SAXText instan
  • getText
    Get the raw text, unwrapped. This method differs from the #toString() implementation because it does
  • setText
  • toWriter
    Write the text to the supplied writer. It wraps the text based on its #getType().

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Best plugins for Eclipse
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