Code example for Element

Methods: getChildNodes

0
     
    private static final long serialVersionUID = 7613237059547988592L;
 
     
    WAPlainTextImpl(Element thisElement) throws WAException {
        NodeList children = thisElement.getChildNodes();
        text = children.getLength() > 0 ? children.item(0).getNodeValue() : "";
    } 
 
     
    ////////////////////  WAPlainText interface  ////////////////////////////// 
     
    public String getText() {
        return text;
    } 
     
     
    ///////////////////////////  Visitor interface  //////////////////////////// 
     
    public void accept(Visitor v) {
        v.visit(this);