Code example for Attributes

Methods: getValue

0
		tempVal = new StringBuilder();
		 
		if(qName.equalsIgnoreCase("folder")) {
			tmp_ = new Folder();
			//create a new instance of employee 
			tmp_.setId(Integer.parseInt(attributes.getValue("id")));
			int tmpBool = Integer.parseInt(attributes.getValue("private"));
			if (tmpBool == 1) 
				tmp_.setBPrivate(true);
			else 
				tmp_.setBPrivate(false);
			tmpBool = Integer.parseInt(attributes.getValue("archived"));
			if (tmpBool == 1)
				tmp_.setArchived(true);
			else 
				tmp_.setArchived(false);
			tmp_.setOrder(Integer.parseInt(attributes.getValue("order")));
		} 
	} 
	 
	public void characters(char[] ch, int start, int length) throws SAXException {
		tempVal.append(ch,start,length);