|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.packages.PackageParserUtils
public class PackageParserUtils
Misc utilities to help extracting elements and attributes out of an XML document.
| Constructor Summary | |
|---|---|
PackageParserUtils()
|
|
| Method Summary | |
|---|---|
static org.w3c.dom.Node |
findChildElement(org.w3c.dom.Node node,
java.lang.String xmlLocalName)
Returns the first child element with the given XML local name. |
static java.lang.Object |
getEnumAttribute(org.w3c.dom.Node archiveNode,
java.lang.String attrName,
java.lang.Object[] values,
java.lang.Object defaultValue)
Retrieve an attribute which value must match one of the given enums using a case-insensitive name match. |
static java.lang.String |
getOptionalXmlString(org.w3c.dom.Node node,
java.lang.String xmlLocalName)
Retrieves the value of that XML element as a string. |
static int |
getXmlInt(org.w3c.dom.Node node,
java.lang.String xmlLocalName,
int defaultValue)
Retrieves the value of that XML element as an integer. |
static long |
getXmlLong(org.w3c.dom.Node node,
java.lang.String xmlLocalName,
long defaultValue)
Retrieves the value of that XML element as a long. |
static java.lang.String |
getXmlString(org.w3c.dom.Node node,
java.lang.String xmlLocalName)
Retrieves the value of that XML element as a string. |
static FullRevision |
parseFullRevisionElement(org.w3c.dom.Node revisionNode)
Parses a full revision element such as |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PackageParserUtils()
| Method Detail |
|---|
public static FullRevision parseFullRevisionElement(org.w3c.dom.Node revisionNode)
revisionNode - The node to parse.
FullRevision. If parsing failed, major is set to
FullRevision.MISSING_MAJOR_REV.
public static org.w3c.dom.Node findChildElement(org.w3c.dom.Node node,
java.lang.String xmlLocalName)
public static java.lang.String getXmlString(org.w3c.dom.Node node,
java.lang.String xmlLocalName)
getOptionalXmlString(Node, String) if you need to know when the
element is missing versus empty.
node - The XML parent node to parse.xmlLocalName - The XML local name to find in the parent node.
public static java.lang.String getOptionalXmlString(org.w3c.dom.Node node,
java.lang.String xmlLocalName)
getXmlString(Node, String) if you don't need to know when the
element is missing versus empty.
node - The XML parent node to parse.xmlLocalName - The XML local name to find in the parent node.
public static int getXmlInt(org.w3c.dom.Node node,
java.lang.String xmlLocalName,
int defaultValue)
public static long getXmlLong(org.w3c.dom.Node node,
java.lang.String xmlLocalName,
long defaultValue)
public static java.lang.Object getEnumAttribute(org.w3c.dom.Node archiveNode,
java.lang.String attrName,
java.lang.Object[] values,
java.lang.Object defaultValue)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||