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 DOMWrapper
public java.lang.String getTagName()
getTagName
in interface DOMWrapper
public java.lang.String getAttribute(java.lang.String attrName)
getAttribute
in interface DOMWrapper
public java.lang.String[] getAttributeNames()
DOMWrapper
getAttributeNames
in interface DOMWrapper
public java.lang.String getText()
getText
in interface DOMWrapper
public java.lang.String toXML()
DOMWrapper
toXML
in interface DOMWrapper
public DOMWrapper[] getChildren()
getChildren
in interface DOMWrapper
public DOMWrapper[] getElementChildren()
getElementChildren
in interface DOMWrapper
public Location getLocation()
DOMWrapper
getLocation
in interface DOMWrapper