public class W3CDOMWrapper extends Object implements DOMWrapper
Constructor and Description |
---|
W3CDOMWrapper(Node node,
Locator locator)
W3CDOMWrapper parses XML based on a Node.
|
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(String attrName)
Return the attribute.
|
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.
|
String |
getTagName()
Retrieve the tag name directly.
|
String |
getText()
Recursively unwrap and create the contained text.
|
int |
getType()
Map the Node's type to DOMWrapper's simplified concept of type.
|
String |
toXML()
Returns this node serialized as XML.
|
final Node node
public int getType()
getType
in interface DOMWrapper
public String getTagName()
getTagName
in interface DOMWrapper
public String getAttribute(String attrName)
getAttribute
in interface DOMWrapper
public String[] getAttributeNames()
DOMWrapper
getAttributeNames
in interface DOMWrapper
public String getText()
getText
in interface DOMWrapper
public 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