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

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

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

origin: com.scireum/sirius-kernel

/**
 * Queries a {@link sirius.kernel.commons.Value} by evaluating the given xpath.
 *
 * @param path the xpath used to retrieve property
 * @return a Value wrapping the value returned by the given xpath expression
 * @throws java.lang.IllegalArgumentException if an invalid xpath was given
 */
@Nonnull
public Value queryValue(String path) {
  return Value.of(queryString(path));
}
origin: com.scireum/sirius-kernel

/**
 * Checks whether a node or non-empty content is reachable via the given
 * XPath.
 *
 * @param path the xpath to be checked
 * @return <tt>true</tt> if a node or non empty property was found, <tt>false</tt> otherwise
 * @throws IllegalArgumentException if an invalid xpath was given
 */
public boolean isFilled(String path) {
  return Strings.isFilled(queryString(path));
}
origin: com.scireum/sirius-kernel

/**
 * Checks whether a node is not reachable or has empty content via the given
 * XPath.
 *
 * @param path the xpath to be checked
 * @return <tt>true</tt> if no node or a empty property was found, <tt>false</tt> otherwise
 * @throws IllegalArgumentException if an invalid xpath was given
 */
public boolean isEmpty(String path) {
  return Strings.isEmpty(queryString(path));
}
origin: stackoverflow.com

XMLReader r = new XMLReader();
 r.addHandler("node", new NodeHandler() {
  @Override
  public void process(StructuredNode node) {
   System.out.println(node.queryString("name"));
   System.out.println(node.queryValue("price").asDouble(0d));
  }
 });
 r.parse(new FileInputStream("src/examples/test.xml"));
sirius.kernel.xmlStructuredNodequeryString

Javadoc

Returns the property at the given relative path as string.

Popular methods of StructuredNode

  • 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
  • visit
    Iterates through the sub-tree and invokes the appropriate handler for each child node.

Popular in Java

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JFileChooser (javax.swing)
  • JLabel (javax.swing)
  • Top plugins for Android Studio
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