public interface Document extends Iterable<Element>, DocumentAssignable, Serializable
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the appropriate method on the visitor based
on the document type.
|
boolean |
contains(String name)
Returns true if the document contains an element with the specified name.
|
Element |
get(String name)
Returns the element with the specified name or null if no element with
that name exists.
|
<E extends Element> |
queryPath(Class<E> clazz,
String... nameRegexs)
Returns the elements matching the path of regular expressions.
|
List<Element> |
queryPath(String... nameRegexs)
Returns the elements matching the path of regular expressions.
|
asDocument
void accept(Visitor visitor)
visitor
- THe visitor for the document.boolean contains(String name)
name
- The name of the element to locate.Element get(String name)
name
- The name of the element to locate.<E extends Element> List<E> queryPath(Class<E> clazz, String... nameRegexs)
E
- The type of element to match.clazz
- The class of elements to match.nameRegexs
- The path of regular expressions.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.