Code example for Attributes

Methods: getValue

0
	@Override 
	protected void startElement(String name, Attributes attributes) {
		switch (name) {
		case "database": 
			super.addDatabase(this.database = new Database(attributes
					.getValue("name")));
			break; 
		case "table": 
			this.database.addTable(this.table = new Table(this.database,
					attributes.getValue("name")));
			break; 
		case "column": 
			this.table.addColumn(new Column(this.table, attributes
					.getValue("name"), attributes.getValue("type"), attributes
					.getValue("nullable").equalsIgnoreCase("true"), KeyType
					.valueOf(attributes.getValue("key")), attributes
					.getValue("default"), attributes.getValue("notes")));
		} 
	} 
}