src/WMS/Library/BusinessRulesEngine/Loader/XmlFileLoader.php
protected function parseNode(RuleCollection $collection, \DOMElement $node, $path, $file)
    {
        if (self::NAMESPACE_URI !== $node->namespaceURI) {
            return;
        }

        switch ($node->localName) {
            case 'rule':
                $this->parseRule($collection, $node, $path);
                break;
            case 'import':
                $this->parseImport($collection, $node, $path, $file);
                break;
            default:
                throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "rule" or "import".', $node->localName, $path));
        }
    }
protected function parseNode(RuleCollection $collection, \DOMElement $node, $path, $file)
    {
        if (self::NAMESPACE_URI !== $node->namespaceURI) {
            return;
        }

        switch ($node->localName) {
            case 'rule':
                $this->parseRule($collection, $node, $path);
                break;
            case 'import':
                $this->parseImport($collection, $node, $path, $file);
                break;
            default:
                throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "rule" or "import".', $node->localName, $path));
        }
    }
Parses a node from a loaded XML file.

@param RuleCollection $collection Collection to associate with the node
@param \DOMElement    $node       Element to parse
@param string         $path       Full path of the XML file being processed
@param string         $file       Loaded file name

@throws \InvalidArgumentException When the XML is invalid