public function getScalarRecords(SimpleXMLElement $element, $asArray = true)
    {
        $data = [];

        //multiple elements
        if ($element->count()) {
            foreach ($element->children() as $name => $property) {
                if (!$property->count()) {
                    $data[$name] = (string)$property;
                }
            }

            return $data;
            //only 1 element
        } elseif ($asArray) {
            return [$element->getName() => (string)$element];
        } else {
            return (string) $element;
        }
    }