public class Tag extends Object implements Serializable
| Constructor and Description |
|---|
Tag() |
| Modifier and Type | Method and Description |
|---|---|
String |
addAttribute(String name,
String value)
Adds the attribute with the given name and value.
|
boolean |
addChild(Tag child,
Integer position) |
Object |
clone() |
Map<String,String> |
getAttributes()
Gets the attributes.
|
List<ChildTagPosition> |
getChildren()
Gets the children.
|
String |
getContent()
Gets the content.
|
String |
getName()
Gets the name.
|
boolean |
isEndTag()
Checks if is end tag.
|
String |
removeAttribute(String name)
Removes the attribute with the given name.
|
boolean |
removeChild(Tag child)
Removes the given child if exists.
|
void |
setContent(String content)
Sets the content.
|
void |
setEndTag(boolean endTag)
Sets the end tag.
|
void |
setName(String name)
Sets the name.
|
String |
toString() |
StringBuilder |
toXmlString()
Creates from this Tag object an xml string.
|
public String addAttribute(String name, String value)
name - the namevalue - the valuepublic Map<String,String> getAttributes()
public List<ChildTagPosition> getChildren()
public String getContent()
public String getName()
public boolean isEndTag()
public String removeAttribute(String name)
name - the namepublic boolean removeChild(Tag child)
child - the childpublic void setContent(String content)
content - the contentpublic void setEndTag(boolean endTag)
endTag - the end tagpublic void setName(String name)
name - the namepublic StringBuilder toXmlString()
Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.