public interface XMLContainer extends XMLizable
Modifier and Type | Method and Description |
---|---|
XMLContainer |
addContent(CharSequence inContent) |
XMLContainer |
addContentWithoutEscaping(CharSequence inContent) |
void |
addSubtag(XMLizable inSubtag) |
void |
addSubtags(Collection<? extends XMLizable> inSubtags) |
void |
clearContent()
Clears content (not subtags).
|
void |
clearSubtags()
Removes all subtags from this object.
|
String |
getContent()
The returned content does not contain any embedded subtags.
|
XMLContainer |
getNextSibling()
Returns the next sibling XMLContainer of this XMLContainer.
|
<T extends XMLNode> |
getOptionalSubtagByName(String inTagName)
Returns the subtag of the specified tag name.
|
<T extends XMLNode> |
getOptionalSubtagByName(XMLName inTagName)
Returns the subtag of the specified tag name.
|
XMLContainer |
getParentNode()
Returns the parent XMLContainer of this XMLContainer.
|
XMLContainer |
getPreviousSibling()
Returns the previous sibling XMLContainer of this XMLContainer.
|
<T extends XMLNode> |
getRequiredSubtagByName(String inTagName)
Returns the subtag of the specified tag name.
|
<T extends XMLNode> |
getRequiredSubtagByName(XMLName inTagName)
Returns the subtag of the specified tag name.
|
<T extends XMLizable> |
getSubtags()
Returns a List of all subtags on this object.
|
<T extends XMLNode> |
getSubtagsByName(String inTagName)
Returns a List of all subtags with the specified tag name on this XMLTag object.
|
<T extends XMLNode> |
getSubtagsByName(String inTagName,
Recursion inRecursion)
Returns a List of all subtags with the specified tag name on this XMLTag object.
|
<T extends XMLNode> |
getSubtagsByName(XMLName inTagName)
Returns a List of all subtags with the specified tag name on this XMLTag object.
|
<T extends XMLNode> |
getSubtagsByName(XMLName inTagName,
Recursion inRecursion)
Returns a List of all subtags with the specified tag name on this XMLTag object.
|
int |
getTotalTagCount()
Returns a count of the total number of tags, including this root tag, its
subtags, the subtags' subtags, etc.
|
String |
getUnescapedContent()
Expands character entities before retuning the content of this XMLTag.
|
<T extends XMLNode> |
getXMLNodeSubtags()
Returns a List of all subtags on this object that implement XMLNode.
|
boolean |
hasContent() |
int |
indexOf(XMLizable inSubtag)
Returns the index of the specified subtag.
|
void |
removeSubtag(XMLizable inSubtag)
Removes all instances of the specified subtag from this object.
|
<T extends XMLNode> |
removeSubtagsByName(String inTagName)
Removes all subtags with the specified tag name from this XMLTag object.
|
<T extends XMLNode> |
removeSubtagsByName(XMLName inTagName)
Removes all subtags with the specified tag name from this XMLTag object.
|
XMLContainer |
setContent(CharSequence inContent) |
void |
setParentNode(XMLContainer inParent)
Specifies the parent XMLContainer of this XMLContainer.
|
<T extends XMLizable> |
setSubtags(List<T> inSubtags)
Sets the subtags of this object to those specified.
|
clone, toIndentedXML, toIndentedXML, toIndentedXML, toXML, toXML, toXML
boolean hasContent()
XMLContainer setContent(CharSequence inContent)
void clearContent()
XMLContainer addContent(CharSequence inContent)
XMLContainer addContentWithoutEscaping(CharSequence inContent)
String getContent()
String getUnescapedContent()
void addSubtags(Collection<? extends XMLizable> inSubtags)
inSubtags
- Collection that should only contain XMLNode objects.<T extends XMLizable> void setSubtags(List<T> inSubtags)
inSubtags
- the list of subtags to be added to this XML tag<T extends XMLizable> List<T> getSubtags()
<T extends XMLNode> List<T> getXMLNodeSubtags()
void removeSubtag(XMLizable inSubtag)
inSubtag
- the subtag to be removedvoid clearSubtags()
int indexOf(XMLizable inSubtag)
inSubtag
- the subtag for which to determine the index<T extends XMLNode> T getRequiredSubtagByName(String inTagName)
inTagName
- the name of the required subtagXMLException
- if zero or more than one subtag with the specified tag name is found.<T extends XMLNode> T getRequiredSubtagByName(XMLName inTagName)
inTagName
- the name of the required subtagXMLException
- if zero or more than one subtag with the specified tag name is found.<T extends XMLNode> T getOptionalSubtagByName(String inTagName)
inTagName
- the name of the optional subtagXMLException
- if more than one subtag with the specified tag name is found.<T extends XMLNode> T getOptionalSubtagByName(XMLName inTagName)
inTagName
- the name of the optional subtagXMLException
- if more than one subtag with the specified tag name is found.<T extends XMLNode> List<T> getSubtagsByName(String inTagName)
inTagName
- the name of the requested subtags<T extends XMLNode> List<T> getSubtagsByName(XMLName inTagName)
inTagName
- the name of the requested subtags<T extends XMLNode> List<T> getSubtagsByName(String inTagName, Recursion inRecursion)
inTagName
- the name of the requested subtagsinRecursion
- flag to indicate whether or not recursion should be used<T extends XMLNode> List<T> getSubtagsByName(XMLName inTagName, Recursion inRecursion)
inTagName
- the name of the requested subtagsinRecursion
- flag to indicate whether or not recursion should be used<T extends XMLNode> List<T> removeSubtagsByName(String inTagName)
inTagName
- the name of the subtags to remove<T extends XMLNode> List<T> removeSubtagsByName(XMLName inTagName)
inTagName
- the name of the subtags to removeint getTotalTagCount()
void setParentNode(XMLContainer inParent)
inParent
- the XML node for which this tag should be a subnodeXMLContainer getParentNode()
XMLContainer getPreviousSibling()
XMLContainer getNextSibling()
jataylor@hairyfatguy.com