|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An interface representing an element in XML. An Element may be either:
isString() returns true) with text given by getString()
isString() returns false) with a tag given by
getTag() and possibly attributes (given by getAttributes() and
getAttributeValue(java.lang.String))
| Method Summary | |
boolean |
disjoint(Element e)
Are this element and another element disjoint? |
boolean |
endsAfter(Element e)
Does this element end after another element? |
boolean |
endsBefore(Element e)
Does this element end before another element? |
boolean |
endsWithin(Element e)
Does this element end within another element? |
List |
getAttributes()
Get a list of attribute keys. |
String |
getAttributeValue(String attr)
Get the value of an attribute. |
Position |
getEnd()
Get the endpoint of this element. |
int |
getLength()
Get the length of this element. |
Position |
getStart()
Get the beginning of this element. |
String |
getString()
Get the string of a string element. |
String |
getTag()
Get the tag of this element. |
boolean |
isEmpty()
Is this element empty? |
boolean |
isString()
Returns true if this element is a string element. |
boolean |
overlaps(Element e)
Does this element overlap with another element? |
boolean |
startsAfter(Element e)
Does this element start after another element? |
boolean |
startsBefore(Element e)
Does this element start before another element? |
boolean |
startsWithin(Element e)
Does this element start within another element? |
boolean |
within(Element e)
Does this element lie within another element? |
| Method Detail |
public Position getStart()
public Position getEnd()
public int getLength()
public boolean isEmpty()
public String getTag()
null if this element is not a tagged element.public List getAttributes()
public String getAttributeValue(String attr)
attr - the attribute key.
null if the attribute
is not present.public boolean isString()
public String getString()
null if this element is a tagged element.public boolean startsBefore(Element e)
e - the element to test against.
e.public boolean startsAfter(Element e)
e - the element to test against.
e.public boolean startsWithin(Element e)
e - the element to test against.
e.public boolean endsBefore(Element e)
e - the element to test against.
e.public boolean endsAfter(Element e)
e - the element to test against.
e.public boolean endsWithin(Element e)
e - the element to test against.
e.public boolean within(Element e)
e - the element to test against.
e.public boolean overlaps(Element e)
e - the element to test against.
e overlap.public boolean disjoint(Element e)
e - the element to test against.
e are disjoint.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||