Tabnine Logo
DocumentViewExporter.startElement
Code IndexAdd Tabnine to your IDE (free)

How to use
startElement
method
in
org.apache.jackrabbit.commons.xml.DocumentViewExporter

Best Java code snippets using org.apache.jackrabbit.commons.xml.DocumentViewExporter.startElement (Showing top 3 results out of 315)

origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Exports the given node either as XML characters (if it's an
 * <code>xml:text</code> node) or as an XML element with properties
 * mapped to XML attributes.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  if (NamespaceHelper.JCR.equals(uri) && "xmltext".equals(local)) {
    try {
      // assume jcr:xmlcharacters is single-valued
      Property property =
        node.getProperty(helper.getJcrName("jcr:xmlcharacters"));
      char[] ch = property.getString().toCharArray();
      characters(ch, 0, ch.length);
    } catch (PathNotFoundException e) {
      // jcr:xmlcharacters not found, ignore this node
    }
  } else {
    // attributes (properties)
    exportProperties(node);
    // encode node name to make sure it's a valid xml name
    String encoded = ISO9075.encode(local);
    startElement(uri, encoded);
    exportNodes(node);
    endElement(uri, encoded);
  }
}
origin: apache/jackrabbit

/**
 * Exports the given node either as XML characters (if it's an
 * <code>xml:text</code> node) or as an XML element with properties
 * mapped to XML attributes.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  if (NamespaceHelper.JCR.equals(uri) && "xmltext".equals(local)) {
    try {
      // assume jcr:xmlcharacters is single-valued
      Property property =
        node.getProperty(helper.getJcrName("jcr:xmlcharacters"));
      char[] ch = property.getString().toCharArray();
      characters(ch, 0, ch.length);
    } catch (PathNotFoundException e) {
      // jcr:xmlcharacters not found, ignore this node
    }
  } else {
    // attributes (properties)
    exportProperties(node);
    // encode node name to make sure it's a valid xml name
    String encoded = ISO9075.encode(local);
    startElement(uri, encoded);
    exportNodes(node);
    endElement(uri, encoded);
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Exports the given node either as XML characters (if it's an
 * <code>xml:text</code> node) or as an XML element with properties
 * mapped to XML attributes.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  if (NamespaceHelper.JCR.equals(uri) && "xmltext".equals(local)) {
    try {
      // assume jcr:xmlcharacters is single-valued
      Property property =
        node.getProperty(helper.getJcrName("jcr:xmlcharacters"));
      char[] ch = property.getString().toCharArray();
      characters(ch, 0, ch.length);
    } catch (PathNotFoundException e) {
      // jcr:xmlcharacters not found, ignore this node
    }
  } else {
    // attributes (properties)
    exportProperties(node);
    // encode node name to make sure it's a valid xml name
    String encoded = ISO9075.encode(local);
    startElement(uri, encoded);
    exportNodes(node);
    endElement(uri, encoded);
  }
}
org.apache.jackrabbit.commons.xmlDocumentViewExporterstartElement

Popular methods of DocumentViewExporter

  • <init>
    Creates a document view exporter.
  • addAttribute
  • exportNodes
  • characters
  • endElement
  • exportProperties
  • exportNode
    Exports the given node either as XML characters (if it's anxml:text node) or as an XML element with

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top 12 Jupyter Notebook extensions
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