This paper investigates two approaches for the handling of hanging nodes in the framework of extended finite element methods (XFEM). Allowing for hanging nodes, locally refined meshes may be easily generated to improve the resolution of general, i.e. model-independent, steep gradients in the problem under consideration. Hence, a combination of these meshes with XFEM facilitates an appropriate modeling of jumps and kinks within elements that interact with steep gradients. Examples for such an interaction are, e.g. found in stress fields near crack fronts or in boundary layers near internal interfaces between two fluids. The two approaches for XFEM based on locally refined meshes with hanging nodes basically differ in whether (enriched) degrees of freedom are associated with the hanging nodes. Both approaches are applied to problems in linear elasticity and incompressible flows. Copyright © 2010 John Wiley & Sons, Ltd.