public function namespaced(string $namespace, array $schema, array $config = []): array
    {
        $document = $this->getContent();
        $namespaces = $this->getAvailableNamespaces();

        if (! \is_null($namespace) && isset($namespaces[$namespace])) {
            $document = $document->children($namespaces[$namespace]);
        }

        $this->content = $document;

        return $this->parse($schema, $config);
    }
public function namespaced(string $namespace, array $schema, array $config = []): array
    {
        $document = $this->getContent();
        $namespaces = $this->getAvailableNamespaces();

        if (! \is_null($namespace) && isset($namespaces[$namespace])) {
            $document = $document->children($namespaces[$namespace]);
        }

        $this->content = $document;

        return $this->parse($schema, $config);
    }
public function namespaced ( string $ namespace , array $ schema , array $ config = [ ] ) : array { $ document = $ this -> getContent ( ) ; $ namespaces = $ this -> getAvailableNamespaces ( ) ; if ( ! \ is_null ( $ namespace ) && isset ( $ namespaces [ $ namespace ] ) ) { $ document = $ document -> children ( $ namespaces [ $ namespace ] ) ; } $ this -> content = $ document ; return $ this -> parse ( $ schema , $ config ) ; }
Set document namespace and parse the XML.

@param  string  $namespace
@param  array  $schema
@param  array  $config

@return array
Set document namespace and parse the XML .