Vortex line and magnetic line representations are introduced for a descript
ion of flows in ideal hydrodynamics and magnetohydrodynamics (MHD), respect
ively. For incompressible fluids, it is shown with the help of this transfo
rmation that the equations of motion for vorticity Omega and magnetic field
follow from a variational principle. By means of this representation, it i
s possible to integrate the hydrodynamic type system with the Hamiltonian H
=integral\Omega\dr and some other systems. It is also demonstrated that the
se representations allow one to remove from the noncanonical Poisson bracke
ts, defined in the space of divergence-free vector fields, the degeneracy c
onnected with the vorticity frozenness for the Euler equation and with magn
etic field frozenness for ideal MHD. For MHD, a new Weber-type transformati
on is found. It is shown how this transformation can be obtained from the t
wo-fluid model when electrons and ions can he considered as two independent
fluids. The Weber-type transformation for ideal MHD gives the whole Lagran
gian vector invariant. When this invariant is absent, this transformation c
oincides with the Clebsch representation analog introduced by V.E. Zakharov
and E. A. Kuznetsov [Dokl. Ajad. Nauk 194, 1288 (1970) [Sov. Phys. Dokl. 1
5, 913 (1971)]]. PACS number(s): 52.30.-9, 52.35.Ra, 52.55.Fa.