Code example for Node

Methods: getTextContent

0
     * Method to process a form element within the XMLForms "instance" element 
     * @param n the DOM node of the form element 
     */ 
    private void processInstanceQuestion(Node n, String parentFormRef) { 	
    	String questionName = n.getNodeName();
    	String defaultAnswer = n.getTextContent();
		String questionRef = parentFormRef + "/" + questionName;
		 
		model.createQuestion(questionRef, questionName);
		model.getQuestion(questionRef).setFormRef(parentFormRef);
		if (!defaultAnswer.equals("")) {
			model.getQuestion(questionRef).setDefaultAnswer(defaultAnswer);
		} 
    } 
     
    /* 
     * Method to process the XMLForms "bind" element 
     * These instances add properties to already created questions 
     * @param n the DOM node of the bind element 
     */ 
    private void processBind(Node n) {