public class XMLTag extends XMLContainerImpl implements XMLNode, Comparable
XMLContainerImpl.sModemContentAndSubtagList| Constructor and Description |
|---|
XMLTag(File inXMLFile) |
XMLTag(InputStream inXML) |
XMLTag(Reader inXML) |
XMLTag(String inName) |
XMLTag(String inName,
Collection<XMLAttribute> inAttributes) |
XMLTag(String inName,
Collection inAttributes,
String inContent) |
XMLTag(String inName,
Map<String,String> inAttributes) |
XMLTag(String inName,
Map inAttributes,
String inContent) |
XMLTag(XMLName inName) |
| Modifier and Type | Method and Description |
|---|---|
XMLTag |
addSubtag(String inTagName) |
XMLTag |
addSubtag(XMLName inTagName) |
XMLTag |
addXMLNamespaceDeclaration(XMLNamespace inValue) |
XMLTag |
clone() |
int |
compareTo(Object inObj2) |
boolean |
equals(Object inObj2) |
List<? extends XMLNode> |
findNodesByAttributeValue(String inAttribute,
String inValue)
Returns a List of all nodes with the specified attribute name and specified attribute value.
|
List<? extends XMLNode> |
findNodesByAttributeValue(XMLName inAttribute,
String inValue)
Returns a List of all nodes with the specified attribute name and specified attribute value.
|
XMLAttribute |
getAttribute(String inAttributeName) |
XMLAttribute |
getAttribute(XMLName inAttributeName) |
Collection<XMLAttribute> |
getAttributes()
Returns a Collection of XMLAttribute objects.
|
String |
getAttributeValue(String inAttributeName) |
String |
getAttributeValue(XMLName inAttributeName) |
String |
getEndTag() |
XMLNamespace |
getNamespace() |
String |
getQualifiedTagName() |
String |
getStartTag() |
String |
getTagName() |
boolean |
hasAttribute(String inAttributeName) |
boolean |
hasAttribute(XMLName inAttributeName) |
boolean |
hasAttributes() |
boolean |
isEmptyTag() |
XMLAttribute |
removeAttribute(String inAttributeName) |
XMLAttribute |
removeAttribute(XMLName inAttributeName) |
void |
replaceCharacterEntities() |
XMLTag |
setAttribute(String inAttributeName,
Object inValue) |
XMLTag |
setAttribute(XMLAttribute inAttribute) |
XMLTag |
setAttribute(XMLName inAttributeName,
Object inValue) |
void |
setAttributes(Collection<XMLAttribute> inAttributes)
Takes a Collection of XMLAttribute objects as input.
|
XMLNode |
setContent(CharSequence inContent) |
XMLTag |
setDefaultXMLNamespaceDeclaration(XMLNamespace inValue) |
XMLTag |
setNamespace(XMLNamespace inValue) |
XMLTag |
setSortAttributesBeforeWriting(boolean inValue) |
XMLTag |
setTagName(String inName) |
XMLTag |
setTagName(XMLName inName) |
protected void |
sortAttributes(List<XMLAttribute> inAttributes) |
String |
toIndentedXML(int inInitialIndentLevel,
int inIndentSize) |
void |
toIndentedXML(OutputStream inOutputStream,
int inInitialIndentLevel,
int inIndentSize)
Writes out the tag (and any subtags) to te specified OutputStream.
|
void |
toIndentedXML(Writer inWriter,
int inInitialIndentLevel,
int inIndentSize) |
void |
toIndentedXML(Writer inWriter,
int inInitialIndentLevel,
int inIndentSize,
XMLNamespaceSet inDeclaredNamespaces) |
String |
toString() |
String |
toXML() |
void |
toXML(OutputStream inStream) |
void |
toXML(Writer inWriter) |
protected void |
toXML(Writer inWriter,
XMLNamespaceSet inDeclaredNamespaces) |
static void |
useDoubleQuotes(boolean inValue) |
void |
verifyTagName(String inTagName) |
void |
verifyTagName(String inTagName,
Case inCaseSensitivity) |
void |
verifyTagName(XMLName inTagName) |
void |
verifyTagName(XMLName inTagName,
Case inCaseSensitivity) |
addContent, addContentWithoutEscaping, addSubtag, addSubtag, addSubtags, clearContent, clearSubtags, getContent, getContentPlusSubtagList, getNextSibling, getOptionalSubtagByName, getOptionalSubtagByName, getOptionalSubtagByName, getOptionalSubtagByName, getParentNode, getPreviousSibling, getRequiredSubtagById, getRequiredSubtagById, getRequiredSubtagByName, getRequiredSubtagByName, getSubtagByAttribute, getSubtagByAttribute, getSubtags, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByClass, getSubtagsByClass, getSubtagsByName, getSubtagsByName, getSubtagsByName, getSubtagsByName, getSubtagsByName, getTotalTagCount, getUnescapedContent, getXMLNodeSubtags, hasContent, hasContentOrSubtags, indexOf, innerHTML, removeSubtag, removeSubtagsByAttribute, removeSubtagsByAttribute, removeSubtagsByAttribute, removeSubtagsByClass, removeSubtagsByClass, removeSubtagsByName, removeSubtagsByName, removeSubtagsByName, setContent, setParentNode, setSubtagsfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddContent, addContentWithoutEscaping, addSubtag, addSubtags, clearContent, clearSubtags, getContent, getNextSibling, getOptionalSubtagByName, getOptionalSubtagByName, getParentNode, getPreviousSibling, getRequiredSubtagByName, getRequiredSubtagByName, getSubtags, getSubtagsByName, getSubtagsByName, getSubtagsByName, getSubtagsByName, getTotalTagCount, getUnescapedContent, getXMLNodeSubtags, hasContent, indexOf, removeSubtag, removeSubtagsByName, removeSubtagsByName, setParentNode, setSubtagspublic XMLTag(String inName, Collection<XMLAttribute> inAttributes)
inName - the tag nameinAttributes - a Collection of XMLAttribute objectspublic XMLTag(String inName, Map<String,String> inAttributes)
inName - the tag nameinAttributes - a Map of attribute (names and values as String objects)public XMLTag(String inName, Collection inAttributes, String inContent)
inName - the tag nameinAttributes - a Collection of XMLAttribute objectsinContent - the tag's contentpublic XMLTag(String inName, Map inAttributes, String inContent)
inName - the tag nameinAttributes - a ImageMap of attribute (names and values as String objects)inContent - the tag's contentpublic XMLTag(InputStream inXML) throws XMLException, IOException
inXML - an InputStream containing XML textXMLExceptionIOExceptionpublic XMLTag(Reader inXML) throws XMLException, IOException
inXML - a Reader containing XML textXMLExceptionIOExceptionpublic XMLTag(File inXMLFile) throws XMLException, IOException
inXMLFile - a File containing XML textXMLExceptionIOExceptionpublic static void useDoubleQuotes(boolean inValue)
public XMLTag setSortAttributesBeforeWriting(boolean inValue)
public XMLTag clone()
clone in interface XMLizableclone in class XMLContainerImplpublic int compareTo(Object inObj2)
compareTo in interface Comparablepublic XMLNode setContent(CharSequence inContent)
setContent in interface XMLContainersetContent in class XMLContainerImplpublic String getStartTag()
public boolean isEmptyTag()
isEmptyTag in interface XMLNodepublic XMLTag setTagName(XMLName inName)
setTagName in interface XMLNodepublic XMLTag setTagName(String inName)
setTagName in interface XMLNodepublic String getTagName()
getTagName in interface XMLNodepublic String getQualifiedTagName()
public void verifyTagName(XMLName inTagName)
verifyTagName in interface XMLNodepublic void verifyTagName(XMLName inTagName, Case inCaseSensitivity)
verifyTagName in interface XMLNodepublic void verifyTagName(String inTagName)
verifyTagName in interface XMLNodepublic void verifyTagName(String inTagName, Case inCaseSensitivity)
verifyTagName in interface XMLNodepublic XMLTag setAttribute(String inAttributeName, Object inValue)
setAttribute in interface XMLNodepublic XMLTag setAttribute(XMLName inAttributeName, Object inValue)
setAttribute in interface XMLNodepublic XMLTag setAttribute(XMLAttribute inAttribute)
setAttribute in interface XMLNodepublic void setAttributes(Collection<XMLAttribute> inAttributes)
setAttributes in interface XMLNodeinAttributes - the attributes to add to the xml nodepublic XMLAttribute getAttribute(XMLName inAttributeName)
getAttribute in interface XMLNodepublic XMLAttribute getAttribute(String inAttributeName)
getAttribute in interface XMLNodepublic boolean hasAttributes()
hasAttributes in interface XMLNodepublic boolean hasAttribute(XMLName inAttributeName)
hasAttribute in interface XMLNodepublic boolean hasAttribute(String inAttributeName)
hasAttribute in interface XMLNodepublic String getAttributeValue(XMLName inAttributeName)
getAttributeValue in interface XMLNodepublic String getAttributeValue(String inAttributeName)
getAttributeValue in interface XMLNodepublic Collection<XMLAttribute> getAttributes()
getAttributes in interface XMLNodepublic XMLAttribute removeAttribute(String inAttributeName)
removeAttribute in interface XMLNodepublic XMLAttribute removeAttribute(XMLName inAttributeName)
removeAttribute in interface XMLNodepublic XMLNamespace getNamespace()
getNamespace in interface XMLNodepublic XMLTag setNamespace(XMLNamespace inValue)
setNamespace in interface XMLNodepublic XMLTag setDefaultXMLNamespaceDeclaration(XMLNamespace inValue)
public XMLTag addXMLNamespaceDeclaration(XMLNamespace inValue)
public List<? extends XMLNode> findNodesByAttributeValue(XMLName inAttribute, String inValue)
findNodesByAttributeValue in interface XMLNodepublic List<? extends XMLNode> findNodesByAttributeValue(String inAttribute, String inValue)
findNodesByAttributeValue in interface XMLNodepublic void toXML(OutputStream inStream)
protected void toXML(Writer inWriter, XMLNamespaceSet inDeclaredNamespaces)
public String toIndentedXML(int inInitialIndentLevel, int inIndentSize)
toIndentedXML in interface XMLizablepublic void toIndentedXML(OutputStream inOutputStream, int inInitialIndentLevel, int inIndentSize)
toIndentedXML in interface XMLizableinOutputStream - OutputStream to which the XML is written.public void toIndentedXML(Writer inWriter, int inInitialIndentLevel, int inIndentSize)
toIndentedXML in interface XMLizablepublic void toIndentedXML(Writer inWriter, int inInitialIndentLevel, int inIndentSize, XMLNamespaceSet inDeclaredNamespaces)
toIndentedXML in interface XMLNodepublic void replaceCharacterEntities()
replaceCharacterEntities in interface XMLNodeprotected void sortAttributes(List<XMLAttribute> inAttributes)
jataylor@hairyfatguy.com