def get(self, element):
        """Retrieve multiple elements.

        The elements are specified by (nodes|ways|relations) parameter
        to the request, as a comma separated list of element IDs.
        """

        if element not in [C.NODES, C.WAYS, C.RELATIONS]:
            # Programming error.
            raise tornado.web.HTTPError(500)

        # Determine the name space to use.
        if element == C.NODES:
            namespace = C.NODE
        elif element == C.WAYS:
            namespace = C.WAY
        elif element == C.RELATIONS:
            namespace = C.RELATION
        else:
            assert False, "Unexpected element '%s'" % element

        # The name of the parameter (i.e., one of "nodes", "ways" or
        # "relations") match the last component of the URI.
        params = self.get_argument(element, None)
        if not params:
            raise tornado.web.HTTPError(400)

        # Create a new response.
        osm = new_osm_response()

        # Add elements to the response.
        for (st,r) in self.datastore.fetch_keys(namespace, params.split(",")):
            if st:
                r.build_response(osm)

        # Send the XML representation back to the client.
        self.set_header(C.CONTENT_TYPE, C.TEXT_XML)
        self.write(response_to_xml(osm))
dataset/ETHPy150Open MapQuest/mapquest-osm-server/src/python/frontend/osmelement.py/OsmMultiElementHandler.get/original