public class JDOMXmlParser
extends java.lang.Object
| Constructor and Description |
|---|
JDOMXmlParser() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.util.Map> |
fieldValuesWithAttributeFor(org.jdom.Element current,
java.lang.String tag,
java.lang.String attributeName)
The assumes a
|
java.util.List<java.util.Map> |
fieldValuesWithAttributeFor(java.lang.String tag)
The assumes a
|
java.util.List<java.util.Map> |
fieldValuesWithAttributeFor(java.lang.String tag,
java.lang.String attributeName)
The assumes a
|
java.util.List<org.jdom.Attribute> |
getAllAttributes(org.jdom.Element element)
Given an Element returns a list of Attributes for the given element.
|
java.lang.String |
getAttributeValue(org.jdom.Element element,
java.lang.String attribute)
Given an Element and the attribute name, returns the String
value of that attribute.
|
org.jdom.Element |
getChildElement(org.jdom.Element current,
java.lang.String childTag)
Given current element/node and tag name of the
child element returns the child element.
|
java.util.List<org.jdom.Element> |
getChildrenList(org.jdom.Element current,
java.lang.String tag)
Given the current Element and the tag name of the child/children
element(s) returns a list of children elements.
|
org.jdom.Document |
getDocuemnt()
Returns the Document object.
|
java.util.List<org.jdom.Element> |
getElementsByTagName(java.lang.String tag)
Given tag name, returns a list of children elements to
the root element.
|
org.jdom.Element |
getRootElement()
Returns the root element.
|
java.lang.String |
getValue(org.jdom.Element element)
Given an Element returns String value of that element.
|
java.util.List<java.lang.String> |
getValues(org.jdom.Element parent,
java.lang.String childTag)
Given any Element and tag name of the child element
returns an arraylist of values of the child element.
|
void |
parse(java.io.File file)
give java "File" object reads and parses
the xml file and builds Document object
|
void |
parse(java.lang.String path)
Given String path to the xml file, builds Document
object by parsing the xml file.
|
void |
parse(VfsFile file)
Given VfsFile file, builds Document
object by parsing the xml file.
|
public void parse(java.lang.String path)
path - public void parse(VfsFile file)
path - public void parse(java.io.File file)
file - public org.jdom.Element getChildElement(org.jdom.Element current,
java.lang.String childTag)
current - childTag - public java.util.List<org.jdom.Element> getElementsByTagName(java.lang.String tag)
tag - public java.util.List<java.lang.String> getValues(org.jdom.Element parent,
java.lang.String childTag)
parent - childTag - public java.lang.String getValue(org.jdom.Element element)
element - public java.util.List<org.jdom.Element> getChildrenList(org.jdom.Element current,
java.lang.String tag)
current - tag - public java.lang.String getAttributeValue(org.jdom.Element element,
java.lang.String attribute)
element - attribute - public java.util.List<org.jdom.Attribute> getAllAttributes(org.jdom.Element element)
element - public java.util.List<java.util.Map> fieldValuesWithAttributeFor(java.lang.String tag)
The assumes a
tag - public java.util.List<java.util.Map> fieldValuesWithAttributeFor(java.lang.String tag,
java.lang.String attributeName)
The assumes a
tag - attributeName - public java.util.List<java.util.Map> fieldValuesWithAttributeFor(org.jdom.Element current,
java.lang.String tag,
java.lang.String attributeName)
The assumes a
tag - attributeName - public org.jdom.Element getRootElement()
public org.jdom.Document getDocuemnt()