|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.capml.dom.Node
|
+--org.capml.dom.Element
Untamed: Represents everything in a Minimal-XML document from a start tag to an end tag, inclusive.
This is a substantial revision by ERights.org of the file as released by the w3c, as is allowed by the license. See the package comment. The original class comment:
The Element interface represents an element in an HTML or XML document. Elements may have attributes associated with them; since the Element interface inherits from Node , the generic Node interface attribute attributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience. In DOM Level 2, the method normalize is inherited from the Node interface where it was moved.
| Field Summary | |
static StaticMaker |
ElementMaker
Deprecated. Enabled: |
private ConstList |
myChildren
Deprecated. |
private String |
myTagName
Deprecated. |
(package private) static long |
serialVersionUID
Deprecated. |
| Fields inherited from class org.capml.dom.Node |
ELEMENT_NODE, TEXT_NODE |
| Fields inherited from interface org.erights.e.elib.serial.Persistent |
HONORARY, HONORED_NAMES |
| Fields inherited from interface org.erights.e.elib.serial.DeepPassByCopy |
HONORARY, HONORED_NAMES |
| Constructor Summary | |
Element(String tagName,
ConstList children)
Deprecated. Enabled: |
|
| Method Summary | |
Astro |
build(AstroBuilder builder)
Deprecated. Enabled: Converts to a Astro (eg, Term or AST) whose functor has this tag name and whose args are my converted children in order. |
ConstList |
getChildNodes()
Deprecated. Enabled: |
short |
getNodeType()
Deprecated. Enabled: |
Object[] |
getSpreadUncall()
Deprecated. Enabled: Uses 'ElementMaker(myTagName, myChildren)' |
String |
getTagName()
Deprecated. Enabled: The name of the element. |
(package private) Node[] |
minimize(Node optLeft)
Deprecated. Asks this Node to return a minimal form of the optional node to the left of itself and itself. |
void |
prettyPrintOn(TextWriter out,
boolean quasiFlag)
Deprecated. Enabled: |
private String |
verb()
Deprecated. Turns the tagName "foo" into the verb "visitFoo". |
Object |
welcome(Object visitor)
Deprecated. Enabled: Does 'visitor visit<TagName>(children...)', where the first letter of tagName is upperCased. |
| Methods inherited from class org.capml.dom.Node |
__printOn, iterate, minimize, supports |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final long serialVersionUID
public static final StaticMaker ElementMaker
private final String myTagName
private final ConstList myChildren
| Constructor Detail |
public Element(String tagName,
ConstList children)
| Method Detail |
public Object[] getSpreadUncall()
public short getNodeType()
getNodeType in class Nodepublic String getTagName()
<elementExample id="demo">
...
</elementExample> ,
tagName has
the value "elementExample" . Note that this is
case-preserving in XML, as are all of the operations of the DOM. The
HTML DOM returns the tagName of an HTML element in the
canonical uppercase form, regardless of the case in the source HTML
document.
public ConstList getChildNodes()
getChildNodes in class Nodepublic Object welcome(Object visitor)
For example, if the tag name is "foo", then the visitor will be called as 'visitor visitFoo(children...)'
welcome in class Nodeprivate String verb()
public void prettyPrintOn(TextWriter out,
boolean quasiFlag)
throws IOException
prettyPrintOn in class NodeIOExceptionpublic Astro build(AstroBuilder builder)
build in class NodeNode[] minimize(Node optLeft)
NodeIf the node to the left is provided (ie, if 'optLeft' isn't null), then this node may safely assume that this provided sibling has already been minimized.
The minimization is much like XML canonicalization, but depends on an assumption specific to Minimal-XML: That for an Element that contains sub-Elements, all pure-whitespace Texts that it also contains may be gotten rid of.
The number of nodes returned cannot exceed the number examined. In other words, if 'optLeft' is null, only zero or one node may be returned. If 'optLeft' isn't null, the number returned may only be zero, one, or two.
minimize in class Node
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||