19 declare(strict_types=1);
34 class ilHandler implements ilDOMParserHandlerInterface
37 protected ilXMLFileNodeInfoFactoryInterface
$info;
43 ilXMLFileNodeInfoFactoryInterface $info,
52 public function withFileHandler(ilXMLFileHandlerInterface $file_handler): ilDOMParserHandlerInterface
55 $clone->xml_file_handler = $file_handler;
56 $clone->dom_doc = $file_handler->loadDomDocument();
60 public function getNodeInfoAt(ilFilePathHandlerInterface
$path): ilXMLFileNodeInfoCollectionInterface
62 $dom_xpath =
new DOMXPath($this->dom_doc);
63 foreach ($this->xml_file_handler->getNamespaces() as
$namespace) {
66 $nodes = $dom_xpath->query($path->toString());
67 $node_info_collection = $this->
info->collection();
69 foreach ($nodes as $node) {
70 $node_info = $this->
info->DOM()->withDOMNode($node);
71 $node_info_collection = $node_info_collection->withElement($node_info);
73 return $node_info_collection;
if($err=$client->getError()) $namespace
ilXMLFileNodeInfoFactoryInterface $info
withFileHandler(ilXMLFileHandlerInterface $file_handler)
getNodeInfoAt(ilParserPathHandlerInterface $path)
ilXMLFileHandlerInterface $xml_file_handler
__construct(ilLogger $logger, ilXMLFileNodeInfoFactoryInterface $info,)