public function XMLParse::resolve in GraphQL 8.4
Returns a parsed XML document.
Parameters
string $input: The source input.
Return value
\DOMElement
File
- src/
Plugin/ GraphQL/ DataProducer/ XML/ XMLParse.php, line 34
Class
- XMLParse
- XML loader data producer.
Namespace
Drupal\graphql\Plugin\GraphQL\DataProducer\XMLCode
public function resolve($input) {
$document = new \DOMDocument();
libxml_use_internal_errors(TRUE);
$document
->loadHTML($input);
return $document->documentElement;
}