Codota Logo
NamespaceContext.getPrefixes
Code IndexAdd Codota to your IDE (free)

How to use
getPrefixes
method
in
org.custommonkey.xmlunit.NamespaceContext

Best Java code snippets using org.custommonkey.xmlunit.NamespaceContext.getPrefixes (Showing top 6 results out of 315)

  • Common ways to obtain NamespaceContext
private void myMethod () {
NamespaceContext n =
  • Codota IconMap prefixMap;new SimpleNamespaceContext(prefixMap)
  • Codota IconXMLUnit.getXpathNamespaceContext()
  • Codota IconObject object;Object object2;new SimpleNamespaceContext(ImmutableMap.of(object, object2))
  • Smart code suggestions by Codota
}
origin: com.github.bordertech.wcomponents/wcomponents-test-lib

  /**
   * @return an iteration of the namespace prefixes in this contex.t
   */
  @Override
  public Iterator<String> getPrefixes() {
    Set<String> prefixes = new HashSet<>(2);
    prefixes.add("ui");
    prefixes.add("html");
    if (backing != null) {
      for (Iterator<?> i = backing.getPrefixes(); i.hasNext();) {
        prefixes.add((String) i.next());
      }
    }
    return prefixes.iterator();
  }
}
origin: org.custommonkey.xmlunit/com.springsource.org.custommonkey.xmlunit

  private static Map turnIntoMap(NamespaceContext ctx) {
    HashMap/*<String, String>*/ m = new HashMap();
    for (Iterator i = ctx.getPrefixes(); i.hasNext(); ) {
      String prefix = (String) i.next();
      String uri = ctx.getNamespaceURI(prefix);
      // according to the Javadocs only the constants defined in
      // XMLConstants are allowed as prefixes for the following
      // two URIs
      if (!XMLConstants.XML_NS_URI.equals(uri)
        && !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(uri)) {
        m.put(prefix, uri);
      }
    }
    m.put(XMLConstants.XML_NS_PREFIX, XMLConstants.XML_NS_URI);
    m.put(XMLConstants.XMLNS_ATTRIBUTE,
       XMLConstants.XMLNS_ATTRIBUTE_NS_URI);
    return m;
  }
}
origin: org.xmlunit/xmlunit-legacy

  static Map<String, String> turnIntoMap(NamespaceContext ctx) {
    Map<String, String> m = new HashMap<String, String>();
    for (Iterator i = ctx.getPrefixes(); i.hasNext(); ) {
      String prefix = (String) i.next();
      String uri = ctx.getNamespaceURI(prefix);
      // according to the Javadocs only the constants defined in
      // XMLConstants are allowed as prefixes for the following
      // two URIs
      if (!XMLConstants.XML_NS_URI.equals(uri)
        && !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(uri)) {
        m.put(prefix, uri);
      }
    }
    m.put(XMLConstants.XML_NS_PREFIX, XMLConstants.XML_NS_URI);
    m.put(XMLConstants.XMLNS_ATTRIBUTE,
       XMLConstants.XMLNS_ATTRIBUTE_NS_URI);
    return m;
  }
}
origin: org.xmlunit/xmlunit-legacy

StringBuilder nsDecls = new StringBuilder();
String quoteStyle = "'";
for (Iterator keys = ctx.getPrefixes(); keys.hasNext(); ) {
  String prefix = (String) keys.next();
  String uri = ctx.getNamespaceURI(prefix);
origin: org.custommonkey.xmlunit/com.springsource.org.custommonkey.xmlunit

StringBuffer nsDecls = new StringBuffer();
String quoteStyle = "'";
for (Iterator keys = ctx.getPrefixes(); keys.hasNext(); ) {
  String prefix = (String) keys.next();
  String uri = ctx.getNamespaceURI(prefix);
origin: com.github.bordertech.wcomponents/wcomponents-core

  /**
   * {@inheritDoc}
   */
  @Override
  public Iterator<String> getPrefixes() {
    Set<String> prefixes = new HashSet<>(2);
    prefixes.add("ui");
    prefixes.add("html");
    if (backing != null) {
      for (Iterator i = backing.getPrefixes(); i.hasNext();) {
        prefixes.add((String) i.next());
      }
    }
    return prefixes.iterator();
  }
}
org.custommonkey.xmlunitNamespaceContextgetPrefixes

Javadoc

Get all prefixes of this context.

Popular methods of NamespaceContext

  • getNamespaceURI
    Obtain the URI for a given prefix.Unlike the method in javax.xml.namespace.NamespaceContext doesn't

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • BoxLayout (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now