com.android.manifmerger
Class XmlLoader
java.lang.Object
com.android.manifmerger.XmlLoader
public final class XmlLoader
- extends java.lang.Object
Responsible for loading XML files.
Method Summary |
static XmlDocument |
load(KeyResolver<java.lang.String> selectors,
PlaceholderHandler.KeyBasedValueResolver<ManifestMerger2.SystemProperty> systemPropertyResolver,
java.lang.String displayName,
java.io.File xmlFile,
com.android.manifmerger.XmlDocument.Type type,
com.google.common.base.Optional<java.lang.String> mainManifestPackageName)
Loads an xml file without doing xml validation and return a XmlDocument |
static XmlDocument |
load(KeyResolver<java.lang.String> selectors,
PlaceholderHandler.KeyBasedValueResolver<ManifestMerger2.SystemProperty> systemPropertyResolver,
XmlLoader.SourceLocation sourceLocation,
java.lang.String xml,
com.android.manifmerger.XmlDocument.Type type,
com.google.common.base.Optional<java.lang.String> mainManifestPackageName)
Loads a xml document from its String representation without doing xml validation and
return a XmlDocument |
static XmlLoader.SourceLocation |
locationFromXml(org.w3c.dom.Element location)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWN
public static final XmlLoader.SourceLocation UNKNOWN
load
public static XmlDocument load(KeyResolver<java.lang.String> selectors,
PlaceholderHandler.KeyBasedValueResolver<ManifestMerger2.SystemProperty> systemPropertyResolver,
java.lang.String displayName,
java.io.File xmlFile,
com.android.manifmerger.XmlDocument.Type type,
com.google.common.base.Optional<java.lang.String> mainManifestPackageName)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
- Loads an xml file without doing xml validation and return a
XmlDocument
- Parameters:
displayName
- the xml file display name.xmlFile
- the xml file.
- Returns:
- the initialized
XmlDocument
- Throws:
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
load
public static XmlDocument load(KeyResolver<java.lang.String> selectors,
PlaceholderHandler.KeyBasedValueResolver<ManifestMerger2.SystemProperty> systemPropertyResolver,
XmlLoader.SourceLocation sourceLocation,
java.lang.String xml,
com.android.manifmerger.XmlDocument.Type type,
com.google.common.base.Optional<java.lang.String> mainManifestPackageName)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
- Loads a xml document from its
String
representation without doing xml validation and
return a XmlDocument
- Parameters:
sourceLocation
- the source location to use for logging and record collection.xml
- the persisted xml.
- Returns:
- the initialized
XmlDocument
- Throws:
java.io.IOException
- this should never be thrown.
org.xml.sax.SAXException
- if the xml is incorrect
javax.xml.parsers.ParserConfigurationException
- if the xml engine cannot be configured.
locationFromXml
public static XmlLoader.SourceLocation locationFromXml(org.w3c.dom.Element location)