Tabnine Logo
Namespace.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
de.pdark.decentxml.Namespace
constructor

Best Java code snippets using de.pdark.decentxml.Namespace.<init> (Showing top 3 results out of 315)

origin: de.pdark/decentxml

namespaces.addNamespace (new Namespace (name.substring (Namespace.NS_PREFIX.length ()), a.getValue ()));
origin: jboss-fuse/fabric8

protected Node replaceNamespace(Node node, String oldNS, String newNS) {
  if (node instanceof Element) {
    String ns = getNamespaceURI(node);
    if (ns != null && ns.equals(oldNS)) {
      Namespace namespace = ((Element) node).getNamespace();
      if (namespace != null) {
        if (namespace.getURI() != null && namespace.getURI().equals(oldNS)) {
          ((Element) node).setNamespace(new Namespace(namespace.getPrefix(), newNS));
        }
      }
      for (Attribute attr : ((Element) node).getAttributes()) {
        if (attr.getName().startsWith("xmlns")) {
          String value = attr.getValue();
          if (value != null && value.equals(oldNS)) {
            attr.setValue(newNS);
          }
        }
      }
    }
  }
  if (node instanceof NodeWithChildren) {
    for (Node n : ((NodeWithChildren) node).getNodes()) {
      replaceNamespace(n, oldNS, newNS);
    }
  }
  return node;
}
origin: io.fabric8.forge/camel-tooling-util

protected Node replaceNamespace(Node node, String oldNS, String newNS) {
  if (node instanceof Element) {
    String ns = getNamespaceURI(node);
    if (ns != null && ns.equals(oldNS)) {
      Namespace namespace = ((Element) node).getNamespace();
      if (namespace != null) {
        if (namespace.getURI() != null && namespace.getURI().equals(oldNS)) {
          ((Element) node).setNamespace(new Namespace(namespace.getPrefix(), newNS));
        }
      }
      for (Attribute attr : ((Element) node).getAttributes()) {
        if (attr.getName().startsWith("xmlns")) {
          String value = attr.getValue();
          if (value != null && value.equals(oldNS)) {
            attr.setValue(newNS);
          }
        }
      }
    }
  }
  if (node instanceof NodeWithChildren) {
    for (Node n : ((NodeWithChildren) node).getNodes()) {
      replaceNamespace(n, oldNS, newNS);
    }
  }
  return node;
}
de.pdark.decentxmlNamespace<init>

Popular methods of Namespace

  • getPrefix
  • getURI
  • equals

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Collectors (java.util.stream)
  • JPanel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
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