Tabnine Logo
XmlUtils.getRootTagName
Code IndexAdd Tabnine to your IDE (free)

How to use
getRootTagName
method
in
com.android.utils.XmlUtils

Best Java code snippets using com.android.utils.XmlUtils.getRootTagName (Showing top 2 results out of 315)

origin: com.android.tools.build/builder

/**
 * Parse the root element of the file, return true if it is a vector.
 */
private static boolean isRootVector(File resourceFile) {
  return TAG_VECTOR.equals(XmlUtils.getRootTagName(resourceFile));
}
origin: com.android.tools.lint/lint-checks

  private static boolean checkResourceRepository(
      @NonNull AbstractResourceRepository resources, @NonNull String name) {
    List<ResourceItem> items = resources.getResourceItem(ResourceType.DRAWABLE, name);

    if (items == null) {
      return false;
    }

    // Check if at least one drawable with this name is a vector.
    for (ResourceItem item : items) {
      ResourceFile source = item.getSource();
      if (source == null) {
        return false;
      }

      File file = source.getFile();
      if (!file.getPath().endsWith(SdkConstants.DOT_XML)) {
        continue;
      }

      return SdkConstants.TAG_VECTOR.equals(XmlUtils.getRootTagName(file));
    }

    return false;
  }
}
com.android.utilsXmlUtilsgetRootTagName

Javadoc

Returns the name of the root element tag stored in the given file, or null if it can't be determined.

Popular methods of XmlUtils

  • parseDocument
    Parses the given XML string as a DOM document, using the JDK parser. The parser does not validate, a
  • parseDocumentSilently
    Parses the given XML string as a DOM document, using the JDK parser. The parser does not validate, a
  • parseUtfXmlFile
    Parses the given UTF file as a DOM document, using the JDK parser. The parser does not validate, and
  • toXmlAttributeValue
    Converts the given attribute value to an XML-attribute-safe value, meaning that single and double qu
  • toXml
  • toXmlTextValue
    Converts the given attribute value to an XML-text-safe value, meaning that less than and ampersand c
  • fromXmlAttributeValue
    Converts the given XML-attribute-safe value to a java string
  • getUtfReader
    Returns a character reader for the given file, which must be a UTF encoded file. The reader does no
  • lookupNamespacePrefix
    Returns the namespace prefix matching the requested namespace URI. If no such declaration is found,
  • append
    Dump node to string without indentation adjustments
  • appendXmlAttributeValue
    Appends text to the given StringBuilder and escapes it as required for a DOM attribute node.
  • appendXmlTextValue
    Appends text to the given StringBuilder and escapes it as required for a DOM text node.
  • appendXmlAttributeValue,
  • appendXmlTextValue,
  • getSourceFilePosition,
  • stripBom

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm 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