Helper methods to parse attributes.