The topological features of a stochastic magnetic field are investigated by the tracing of magnetic field lines. The first method consists of direct integration of the field line equations. An alternative approach is to invoke the incompressibility of the magnetic field in order to formulate a Hamiltonian description of the magnetic field lines. The third and last approach involves building a canonical map that models the magnetic topology. These three different methods are applied to the TEXTOR tokamak device with a magnetic field perturbation driven by Dynamic Ergodic Divertor (DED) coils, and the results agree with respect to the extent of the island structures near the most relevant resonant surfaces. The perturbed, twisted map that we have obtained differs from the standard map (radial twist map) and constitutes an efficient method for the determination of the magnetic field line trajectories.