|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A node in the XML parse tree representing an XML element.
The ElementInfo provides information about the element and its context. Information available includes the tag and attributes of the element, and pointers to the parent element and the previous element at the same level.
Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, TEXT |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Method Summary | |
void |
addNamespaceNodes(ElementInfo owner,
java.util.Vector list,
NodeInfo stop)
Make the set of all namespace nodes associated with this element. |
AttributeCollection |
getAttributeList()
Get the attribute list for this element. |
java.lang.String |
getInheritedAttribute(Name name)
Find the value of an inherited attribute. |
java.lang.String |
getPrefixForURI(java.lang.String uri)
Search the NamespaceList for a given URI, returning the corresponding prefix. |
java.lang.String |
getURIforPrefix(java.lang.String prefix)
Search the NamespaceList for a given prefix, returning the corresponding URI. |
boolean |
isFirstChild()
Determine whether this element is the first child of its parent. |
boolean |
isFirstInGroup()
Determine whether this element is the first in a consecutive group. |
boolean |
isLastChild()
Determine whether this element is the last child element of its parent. |
boolean |
isLastInGroup()
Determine whether this element is the last in a consecutive group. |
AttributeInfo |
makeAttributeNode(Name attributeName)
Make an attribute node for a given attribute of this element |
void |
outputNamespaceNodes(Outputter out)
Output all namespace nodes associated with this element. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value of an attribute on the current element. |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Method Detail |
public AttributeCollection getAttributeList()
public java.lang.String getInheritedAttribute(Name name) throws org.xml.sax.SAXException
name
- the name of the attributepublic void setAttribute(java.lang.String name, java.lang.String value) throws org.xml.sax.SAXException
name
- The name of the attribute to be set.value
- The new value of the attribute. Set this to null to remove the attribute.public AttributeInfo makeAttributeNode(Name attributeName) throws org.xml.sax.SAXException
name
- The attribute namepublic java.lang.String getURIforPrefix(java.lang.String prefix) throws org.xml.sax.SAXException
prefix
- The prefix to be matched. To find the default namespace, supply ""org.xml.sax.SAXException
- if the prefix has not been declared on this element or a containing
element.public java.lang.String getPrefixForURI(java.lang.String uri)
uri
- The URI to be matched. To find the default namespace, supply ""public void addNamespaceNodes(ElementInfo owner, java.util.Vector list, NodeInfo stop) throws org.xml.sax.SAXException
owner
- The element node to own these namespace nodeslist
- a vector containing NamespaceInfo objects representing the namespaces
in scope for this element; the method appends nodes to this Vector, which should
initially be empty.stop
- the ancestor node to stop at. Supply null to go all the way back to
the Document nodepublic void outputNamespaceNodes(Outputter out) throws org.xml.sax.SAXException
out
- The relevant outputterpublic boolean isFirstInGroup() throws org.xml.sax.SAXException
public boolean isLastInGroup() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- Note that this method is supported when
using direct access to the document (using the Wanderer);
when processing serially using the Distributor, it is supported using lookahead
during end-tag processing onlypublic boolean isFirstChild() throws org.xml.sax.SAXException
public boolean isLastChild() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- Note that this method is only supported when
using direct access to the document (using the Wanderer); it throws an exception
if used when processing serially using the Distributor.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |