|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.xml.XMLElement
public class XMLElement
DOCUMENT ME!
| Field Summary | |
|---|---|
protected java.util.Vector |
attributes
DOCUMENT ME! |
protected java.lang.String |
name
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
XMLElement(java.lang.String name)
Make a new XMLElement |
|
XMLElement(java.lang.String name,
XMLAttribute[] attList)
Make a new XMLElement with the specified name and attributes |
|
| Method Summary | |
|---|---|
void |
addAttribute(XMLAttribute attribute)
Add a new attribute to the attribute list |
java.lang.Object |
clone()
|
XMLAttribute |
getAttribute(java.lang.String name)
Get the (first) attribute with a certain name |
protected int |
getAttributeIndex(java.lang.String name)
Get the index of an attribute in the attribute array |
XMLAttribute[] |
getAttributesArray()
DOCUMENT ME! |
java.lang.String |
getCloseTag()
DOCUMENT ME! |
java.lang.String |
getName()
DOCUMENT ME! |
java.lang.String |
getOpenTag()
DOCUMENT ME! |
static XMLElement |
parse(java.lang.String string)
Parse a new XML element from a string which contains a XML tag |
void |
removeAllAttributes()
Reset the attribute list (make it empty) |
void |
removeAttribute(java.lang.String name)
Remove the (first) attribute with this name |
void |
setAttribute(XMLAttribute attribute)
Change the attribute with the name of the parameter attribute to the value of the parameter attribute. |
void |
setName(java.lang.String name)
Change the name of this XML element |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected java.util.Vector attributes
| Constructor Detail |
|---|
public XMLElement(java.lang.String name)
name - The name of the new element
public XMLElement(java.lang.String name,
XMLAttribute[] attList)
name - The name of the new elementattList - An array that contains the attributes for this element
(instances of gld.xml.XMLAttribute)| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - The new namepublic void addAttribute(XMLAttribute attribute)
attribute - The new attribute
public void removeAttribute(java.lang.String name)
throws java.util.NoSuchElementException
name - The name of the attribute which has to be removed
java.util.NoSuchElementException - If an attribute with that name cannot be
found.
protected int getAttributeIndex(java.lang.String name)
throws java.util.NoSuchElementException
name - The name to search for
java.util.NoSuchElementException - If an attribute with that name cannot be
found.
public XMLAttribute getAttribute(java.lang.String name)
throws java.util.NoSuchElementException
name - The name to search for
java.util.NoSuchElementException - If an attribute with that name cannot be
found.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic void removeAllAttributes()
public XMLAttribute[] getAttributesArray()
public void setAttribute(XMLAttribute attribute)
attribute - The attribute to set.public java.lang.String getOpenTag()
public java.lang.String getCloseTag()
public static XMLElement parse(java.lang.String string)
throws XMLTreeException
string - The string to parse
XMLTreeException - If the string doesn't contain a valid XML tag.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||