public class XmlDocument
extends java.lang.Object
Constructor and Description |
---|
XmlDocument() |
Modifier and Type | Method and Description |
---|---|
void |
addProcessingInstruction(XmlProcessingInstruction instruction) |
void |
clearProcessingInstruction() |
Element[] |
find(IElementFilter filter)
Returns all sub elements matching the given filter.
|
Element[] |
find(java.lang.String tagName,
java.util.Map<java.lang.String,java.lang.String> attributes)
Returns all sub elements with the given tag name and the specified
attribute values plus this element if it matches the tagName and
attributes.
|
Element |
findFirst(IElementFilter filter)
Returns the first element in the hierarchy that matches the given filter
or null if none matches.
|
java.lang.String |
getEncoding() |
XmlProcessingInstruction[] |
getProcessingInstructions() |
Element |
getRootElement() |
boolean |
hasProcessingInstructions() |
void |
setEncoding(java.lang.String encoding) |
void |
setRootElement(Element rootElement) |
public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
public Element getRootElement()
public void setRootElement(Element rootElement)
public XmlProcessingInstruction[] getProcessingInstructions()
public void addProcessingInstruction(XmlProcessingInstruction instruction)
public void clearProcessingInstruction()
public boolean hasProcessingInstructions()
public Element[] find(java.lang.String tagName, java.util.Map<java.lang.String,java.lang.String> attributes)
tagName
- The name of the elements to be found (must not be null).attributes
- Definition of attributes the elements must match (may be null).public Element[] find(IElementFilter filter)
filter
- The filter that defines which elements match (must not be null).public Element findFirst(IElementFilter filter)
filter
- The filter that defines which elements match (must not be null).