Code example for Node

Methods: getAttributes

0
		if (baseObj == null || !(baseObj instanceof Board))
			obj = new Board();
		else 
			obj = (Board)baseObj;
		//부모 attributes, elements값 설정 
		MisObject.toObject(node, obj);
		 
		NamedNodeMap attrMap = node.getAttributes();
		if (attrMap != null) {
			Node title = attrMap.getNamedItem(A_TITLE);
			Node content = attrMap.getNamedItem(A_CONTENT);
			Node fileGroupId = attrMap.getNamedItem(A_FILEGROUPID);
			 
			if(title != null)
				obj.setTitle(title.getNodeValue());
			if(content != null)
				obj.setContent(content.getNodeValue());
			if(fileGroupId != null)
				obj.setFileGroupId(fileGroupId.getNodeValue());
		}