Code example for Element

Methods: getChildNodes

0
 
    // ================FOLLOWING METHODS USE INPUT XML FILE=======================// 
    public void setCommandName() { 
        NodeList commandName = this.xmlCommand.getElementsByTagName("name");
        Element commandElmnt = (Element) commandName.item(0);
        NodeList commandNm = commandElmnt.getChildNodes();
        this.commandName = (((Node) commandNm.item(0)).getNodeValue());
    } 
 
    public String getName() {
        return commandName;
    } 
 
    public void setTestCaseInfo() { 
        this.testCaseInfo = getElementByName("testcase");
    } 
 
    public String getHost() {
        return host;
    }