|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xpresso.xml.XmlContent
org.xpresso.xml.Element
public class Element
Element represents a level in the XML tree. If stacked in the Document
,
any further content
will be added as child of this Element.
This code is under the LGPL v3 licence.
Field Summary |
---|
Fields inherited from class org.xpresso.xml.XmlContent |
---|
content |
Constructor Summary | |
---|---|
protected |
Element(java.lang.String label)
Constructor creating a new Element using a given label. |
Method Summary | |
---|---|
void |
addAttribute(java.lang.String key,
java.lang.String value)
Adds an attribute to the Element, using given key and value. |
Element |
clone()
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Return the map containing all attributes |
java.lang.String |
getLabel()
Returns the label of the Element |
java.lang.String |
getText()
Return the Element as an empty element |
static boolean |
isValid(java.lang.String content)
Tests if the given String is a valid element or attribut name |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Element(java.lang.String label) throws IllegalContentException
label
- The label of the Element
IllegalContentException
- Thrown if label contains invalid characters. Valid characters are uppercase andMethod Detail |
---|
public void addAttribute(java.lang.String key, java.lang.String value) throws IllegalContentException
key
- the key part of the attributevalue
- the value part of the attribute
IllegalContentException
- Thrown if label contains invalid characters. Valid characters are uppercase andpublic java.lang.String getLabel()
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public java.lang.String getText()
getText
in class XmlContent
public static boolean isValid(java.lang.String content)
content
- text to be tested
public Element clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |