Tabnine Logo
StructuredNode.visit
Code IndexAdd Tabnine to your IDE (free)

How to use
visit
method
in
sirius.kernel.xml.StructuredNode

Best Java code snippets using sirius.kernel.xml.StructuredNode.visit (Showing top 3 results out of 315)

origin: com.scireum/sirius-kernel

/**
 * Iterates through the sub-tree and invokes the given handler for each text node.
 *
 * @param textNodeHandler the handler invoked for each text node
 */
public void visitTexts(Consumer<Node> textNodeHandler) {
  visit(null, textNodeHandler);
}
origin: com.scireum/sirius-kernel

/**
 * Iterates through the sub-tree and invokes the given handler for each child node.
 *
 * @param nodeHandler the handler invoked for each child element
 */
public void visitNodes(Consumer<StructuredNode> nodeHandler) {
  visit(nodeHandler, null);
}
origin: com.scireum/sirius-kernel

/**
 * Iterates through the sub-tree and invokes the appropriate handler for each child node.
 *
 * @param nodeHandler     the handler invoked for each element node
 * @param textNodeHandler the handler invoked for each text node
 */
public void visit(@Nullable Consumer<StructuredNode> nodeHandler, @Nullable Consumer<Node> textNodeHandler) {
  if (node.getNodeType() == Node.TEXT_NODE) {
    if (textNodeHandler != null) {
      textNodeHandler.accept(node);
    }
  } else if (node.getNodeType() == Node.ELEMENT_NODE) {
    if (nodeHandler != null) {
      nodeHandler.accept(this);
    }
    getChildren().forEach(c -> c.visit(nodeHandler, textNodeHandler));
  }
}
sirius.kernel.xmlStructuredNodevisit

Javadoc

Iterates through the sub-tree and invokes the appropriate handler for each child node.

Popular methods of StructuredNode

  • queryString
    Returns the property at the given relative path as string.
  • queryValue
    Queries a sirius.kernel.commons.Value by evaluating the given xpath.
  • <init>
    Wraps the given node
  • compile
  • getChildren
    Returns a list of all children of this DOM node.
  • getNode
    Returns the underlying W3C Node.
  • of
    Wraps the given W3C node into a structured node.
  • queryNode
    Returns a given node at the relative path.
  • serializeNodeAsXML
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JTable (javax.swing)
  • 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