public function getAttributes()
    {
        $attributes = array();

        foreach ($this->ownerDocument->getXpath()->query('@*', $this) as $attribute) {
            $attributes[$attribute->localName] = $attribute->nodeValue;
        }

        return $attributes;
    }