[1][2][3] The main version anthologized was taken down from a soldier; there is also a variant collected from Zwehrn (Zweheren [de]) whose storyline summarized by Grimm in his notes.
Walking in that field, he met a black mannikin (dwarf)[a] who promised to make him rich if, in twelve years, he brought the first thing that rubbed against his leg when he went home.
He agreed and did it, and she married him, making him the King of the Golden Mountain, and in time bore him a son.
He walked until he found three giants quarreling over their inheritance: a sword that would cut off all heads but the owner's, if ordered to; a cloak of invisibility; and boots that would carry the wearer anywhere.
As they refused to do this, and tried to seize him, the hero invoked the command to his magic sword, and all other heads rolled off.
[1][5] The tale is classified in the international Aarne-Thompson-Uther Index as type ATU 400, "The Man on a Quest for the Lost Wife":[6][7] the hero finds a maiden of supernatural origin (e.g., the swan maiden) or rescues a princess from an enchantment; either way, he marries her, but she disappears to another place.
He goes after her on a long quest, often helped by the elements (Sun, Moon and Wind) or by the rulers of animals of the land, sea and air (often in the shape of old men and old women).