java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.android.XmlResourceHelper |
Known Direct Subclasses |
Known Indirect Subclasses |
This helper class facilitates access to the data contained in an XML resource. In particular, the
readAttributeXxx
methods allow easy retrieval of attribute values by tag names,
throughout the entire document.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected Document | doc | ||||||||||
protected Element | rootElt |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
XmlResourceHelper(IXmlUnit xml)
Create a manifest helper around the provided manifest unit.
| |||||||||||
XmlResourceHelper(Document doc)
Create a manifest helper around the provided low-level XML document object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Element |
getRootElement()
This low-level method offers access to the
org.w3c.dom.Element holding the root. | ||||||||||
boolean | hasAttributeValue(String tagName, String attrName, String wantedAttrValue) | ||||||||||
String |
readAttribute(String tagName, String attrName)
Retrieve the attribute value of the first tag having the provided name.
| ||||||||||
List<String> |
readAttributes(String tagName, String attrName)
Retrieve the attribute values for all tags having the provided name.
| ||||||||||
List<List<String>> |
readMultiAttributes(String tagName, String... attrNames)
Retrieve several attribute values for all tags having the provided name.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | buildAttributeName(String name) | ||||||||||
List<Element> | convertEltlist(NodeList nodelist) | ||||||||||
List<Node> | convertNodelist(NodeList nodelist) | ||||||||||
String | getAttr(Element elt, String name) | ||||||||||
String | getSimpleName(String name) | ||||||||||
boolean | isFullyQualifiedName(String name) | ||||||||||
boolean | isSimpleName(String name) | ||||||||||
void | prepare(Document doc) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a manifest helper around the provided low-level XML document object.
This low-level method offers access to the org.w3c.dom.Element
holding the root.
Retrieve the attribute value of the first tag having the provided name.
Retrieve the attribute values for all tags having the provided name.
Retrieve several attribute values for all tags having the provided name.
attrNames | a collection of attributes to be retrieved |
---|