$xpath =
new DOMXPath($xml);
$form =
[ 'label' =>
[],
'description' =>
[],
'elements' =>
[],
];
$label =
$xpath->
query('//config/label'
);
if ($label instanceof DOMNodeList
) { $form['label'
] = self::
parseTranslatableNodeList($label);
} $description =
$xpath->
query('//config/description'
);
if ($description instanceof DOMNodeList
) { $form['description'
] = self::
parseTranslatableNodeList($description);
} $elements =
$xpath->
query('//config/elements/element'
);
if ($elements instanceof DOMNodeList
) { $form['elements'
] =
$this->
parseElementNodeList($elements);
}