Geometric Formulation of Edge and Nodal Finite Element Equations in Electromagnetics