public class W3CDOMWrapper extends java.lang.Object implements DOMWrapper
| Modifier and Type | Field and Description |
|---|---|
(package private) org.w3c.dom.Node |
node |
| Constructor and Description |
|---|
W3CDOMWrapper(org.w3c.dom.Node node,
Locator locator)
W3CDOMWrapper parses XML based on a Node.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAttribute(java.lang.String attrName)
Return the attribute.
|
java.lang.String[] |
getAttributeNames()
Returns a list of attribute names.
|
DOMWrapper[] |
getChildren()
Retrieve all children, and build an array of W3CDOMWrappers around
each child that is of TEXT or ELEMENT type to return.
|
DOMWrapper[] |
getElementChildren()
Retrieve all children, and build an array of W3CDOMWrappers around
each ELEMENT child.
|
Location |
getLocation()
Returns the location of this element.
|
java.lang.String |
getTagName()
Retrieve the tag name directly.
|
java.lang.String |
getText()
Recursively unwrap and create the contained text.
|
int |
getType()
Map the Node's type to DOMWrapper's simplified concept of type.
|
java.lang.String |
toXML()
Returns this node serialized as XML.
|
public W3CDOMWrapper(org.w3c.dom.Node node,
Locator locator)
node - DOM Nodelocator - Callback to find location of node. May be null.public int getType()
getType in interface DOMWrapperpublic java.lang.String getTagName()
getTagName in interface DOMWrapperpublic java.lang.String getAttribute(java.lang.String attrName)
getAttribute in interface DOMWrapperpublic java.lang.String[] getAttributeNames()
DOMWrappergetAttributeNames in interface DOMWrapperpublic java.lang.String getText()
getText in interface DOMWrapperpublic java.lang.String toXML()
DOMWrappertoXML in interface DOMWrapperpublic DOMWrapper[] getChildren()
getChildren in interface DOMWrapperpublic DOMWrapper[] getElementChildren()
getElementChildren in interface DOMWrapperpublic Location getLocation()
DOMWrappergetLocation in interface DOMWrapper