Package net.jodah.xsylum
Class XmlDocument
- java.lang.Object
-
- net.jodah.xsylum.XmlSearchable<Document>
-
- net.jodah.xsylum.XmlDocument
-
public class XmlDocument extends XmlSearchable<Document>
An XML document.
-
-
Field Summary
-
Fields inherited from class net.jodah.xsylum.XmlSearchable
source
-
-
Constructor Summary
Constructors Constructor Description XmlDocument(Document document)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Document
document()
Returns the underlying document.XmlElement
get(String tagName)
Returns the first XmlElement matching thetagName
.List<XmlElement>
getAll(String tagName)
Returns all child XmlElements matching thetagName
.XmlElement
root()
Returns the root document element.String
toString()
-
Methods inherited from class net.jodah.xsylum.XmlSearchable
find, findAll, value, valueAsBoolean, valueAsDouble, valueAsEnum, valueAsInt, valueAsLong, values, valuesAsBoolean, valuesAsDouble, valuesAsEnum, valuesAsInt, valuesAsLong
-
-
-
-
Constructor Detail
-
XmlDocument
public XmlDocument(Document document)
-
-
Method Detail
-
document
public Document document()
Returns the underlying document.
-
get
public XmlElement get(String tagName)
Returns the first XmlElement matching thetagName
.- Specified by:
get
in classXmlSearchable<Document>
-
getAll
public List<XmlElement> getAll(String tagName)
Returns all child XmlElements matching thetagName
.- Specified by:
getAll
in classXmlSearchable<Document>
-
root
public XmlElement root()
Returns the root document element.
-
-