@classmethod
def from_xml(cls, node):
    """
        Construct an SMD from an EAGLE XML ``smd`` node.
        """
    return cls(name=node.attrib['name'], pos=(float(node.attrib['x']),
        float(node.attrib['y'])), size=(float(node.attrib['dx']), float(
        node.attrib['dy'])), layer=int(node.attrib['layer']))
