Code example for Node

Methods: setTextContent

0
        assertXmlExists("No login-name found in template data. ", document, "/user-account/properties/login-name");
        assertXmlExists("No name found in template data. ", document, "/user-account/properties/name");
 
        if (loginname != null) {
            final Node loginNameNode = selectSingleNode(document, "/user-account/properties/login-name");
            loginNameNode.setTextContent(loginname);
        } 
 
        if (name != null) {
            final Node nameNode = selectSingleNode(document, "/user-account/properties/name");
            nameNode.setTextContent(name);
        } 
 
    } 
 
    /** 
     * Successfully creates an UserAccount. 
     * 
     * @param templateName The name of the template. 
     * @return Returns the UserAccount document.