Fix Issue #215 - The previous logic used attributes for Key/Value, not elements.