Based on the code proposed in PR 70 of the atom-syndication crate. Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>