'Builds a list of dictionaries containing elastic IP properties.
:param    only_associated: If true, return only those addresses
that are associated with an instance.
If false, return all addresses.
:type     only_associated: ``bool``
:rtype:   ``list`` of :class:`ElasticIP`'

def _to_addresses(self, response, only_associated):

    addresses = []
    for el in response.findall(fixxpath(xpath='addressesSet/item', namespace=NAMESPACE)):
        addr = self._to_address(el, only_associated)
        if (addr is not None):
            addresses.append(addr)
    return addresses
