|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.dom.DOMAccess
Method to support accessing the LazyDOM without expanding it. This works both with standard DOMs and LazyDOMs, supporting the development of code that works with either DOM.
Most methods come in two flavors, static ones that take the instance document as an argument, an instance methods that use a document contained in an instance of this object. Great care should be used if the return nodes are to be modified, as read-only template nodes maybe returned. These methods also operate on any W3C DOM.
Constructor Summary | |
DOMAccess(Document document)
Create a object to access a specific document. |
Method Summary | |
static Attr |
accessAttribute(Document document,
Element element,
String namespaceURI,
String name)
Access an attribute of an Element. |
Attr |
accessAttribute(Element element,
String namespaceURI,
String name)
Access an attribute of an Element. |
String |
accessAttributeValue(Attr attr)
Access the value of an attribute |
static String |
accessAttributeValue(Document document,
Attr attr)
Access the value of an attribute |
Element |
accessDocumentElement()
Access the document element of the document. |
static Element |
accessDocumentElement(Document document)
Access the document element of a document. |
DocumentType |
accessDocumentType()
Access the document type node. |
static DocumentType |
accessDocumentType(Document document)
Access the document type node. |
static Node |
accessFirstChild(Document document,
Node parent)
Access the first child of a node. |
Node |
accessFirstChild(Node parent)
Access the first child of a node. |
static Node |
accessNextSibling(Document document,
Node node)
Access the next sibling of a node. |
Node |
accessNextSibling(Node node)
Access the next sibling of a node. |
static Element |
getExpandedElement(Document document,
Element element)
If an Element node is a LazyDOM template, expand it. |
Element |
getExpandedElement(Element element)
If an Element node is a LazyDOM template, expand it This is a special case of getExpandedNode(). |
static Node |
getExpandedNode(Document document,
Node node)
If a Node is a LazyDOM template node, expand it. |
Node |
getExpandedNode(Node node)
If a Node is a LazyDOM template node, expand it. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public DOMAccess(Document document)
document
- The document to access. if this is a LazyDOM instance
document, access will switch between the instance and template
as appropriate.Method Detail |
public static DocumentType accessDocumentType(Document document)
document
- The instance document object.public DocumentType accessDocumentType()
public static Node accessFirstChild(Document document, Node parent)
document
- The instance document object.parent
- The parent node of the desired child.public Node accessFirstChild(Node parent)
parent
- The parent node of the desired child.public static Node accessNextSibling(Document document, Node node)
document
- The instance document object.node
- Get the next sibling of this nodepublic Node accessNextSibling(Node node)
node
- Get the next sibling of this nodepublic static Element accessDocumentElement(Document document)
document
- The instance document object.public Element accessDocumentElement()
public static Attr accessAttribute(Document document, Element element, String namespaceURI, String name)
document
- The instance document object.element
- The Element node.namespaceURI
- The namespace URI, or null if there is none.name
- The name of the attribute.public Attr accessAttribute(Element element, String namespaceURI, String name)
element
- The Element node.namespaceURI
- The namespace URI, or null if there is none.name
- The name of the attribute.public static String accessAttributeValue(Document document, Attr attr)
document
- The instance document object.attr
- The Attr node.public String accessAttributeValue(Attr attr)
attr
- The Attr node.public static Node getExpandedNode(Document document, Node node)
document
- The instance document object.node
- A node of the document or it's template.public Node getExpandedNode(Node node)
node
- A node of the document or it's template.public static Element getExpandedElement(Document document, Element element)
document
- The instance document object.element
- An element of the document or it's template.public Element getExpandedElement(Element element)
element
- An element of the document or template.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |