The Swineherd

A wealthy prince wants to marry the Emperor's daughter and sends her two beautiful gifts, a nightingale and a rose.

The princess slogs through the mud to the swineherd's hut and pays ten kisses for the pot.

In Basile's Pentamerone (1634) a tale tells of proud Cinziella and her wooing by a prince disguised as a gardener.

In the Grimm collections, "King Thrushbeard" is a similar tale of a royal disguising himself to woo an arrogant princess.

[1] Professor D. L. Ashliman acknowledged Andersen's literary tale as originating from similar European stories of a swineherd who flirts with a princess.

[3] August Leskien wrote that the "Märchenkreis" is very widespread in Slavic tradition, with the same plot: the princess sees the dancing animals (sheep, pigs, etc.)