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

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

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

origin: com.android.tools.lint/lint-api

private static void writeAttribute(Writer writer, int indent, String name, String value)
    throws IOException {
  writer.write('\n');
  indent(writer, indent);
  writer.write(name);
  writer.write('=');
  writer.write('"');
  writer.write(XmlUtils.toXmlAttributeValue(value));
  writer.write('"');
}
origin: com.android.tools.lint/lint

private static void writeAttribute(Writer writer, int indent, String name, String value)
    throws IOException {
  writer.write('\n');
  indent(writer, indent);
  writer.write(name);
  writer.write('=');
  writer.write('"');
  writer.write(XmlUtils.toXmlAttributeValue(value));
  writer.write('"');
}
origin: com.android.tools.build/gradle-core

@NonNull
public Node toXml(@NonNull Document document) {
  Element artifact = document.createElement(TAG_ARTIFACT);
  artifact.setAttribute(ATTR_TYPE, fileType.name());
  artifact.setAttribute(
      ATTR_LOCATION, XmlUtils.toXmlAttributeValue(location.getAbsolutePath()));
  return artifact;
}
origin: com.android.tools/common

sb.append(attribute.getNodeName());
sb.append('=').append('"');
sb.append(toXmlAttributeValue(attribute.getNodeValue()));
sb.append('"');
origin: com.android.tools.lint/lint

for (MultiProjectHtmlReporter.ProjectEntry entry : projects) {
  append("      <a class=\"mdl-navigation__link\" href=\""
      + XmlUtils.toXmlAttributeValue(entry.fileName) + "\">"
      + entry.path + " (" + (entry.errorCount + entry.warningCount) + ")</a>\n");
  append(XmlUtils.toXmlAttributeValue(entry.fileName));
  append("\">");
  append(entry.path);
com.android.utilsXmlUtilstoXmlAttributeValue

Javadoc

Converts the given attribute value to an XML-attribute-safe value, meaning that single and double quotes are replaced with their corresponding XML entities.

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
  • 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
  • getRootTagName
    Returns the name of the root element tag stored in the given file, or null if it can't be determined
  • 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

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
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