public function findTypeElement($name)
    {
        $type = null;

        $elements = $this->xpath('//s:simpleType[@name=%s]|//s:complexType[@name=%s]', $name, $name);
        if ($elements->length > 0) {
            $type = $elements->item(0);
        }

        if (empty($type)) {
            foreach ($this->referereces as $import) {
                $type = $import->findTypeElement($name);
                if (!empty($type)) {
                    break;
                }
            }
        }

        return $type;
    }
public function findTypeElement($name)
    {
        $type = null;

        $elements = $this->xpath('//s:simpleType[@name=%s]|//s:complexType[@name=%s]', $name, $name);
        if ($elements->length > 0) {
            $type = $elements->item(0);
        }

        if (empty($type)) {
            foreach ($this->referereces as $import) {
                $type = $import->findTypeElement($name);
                if (!empty($type)) {
                    break;
                }
            }
        }

        return $type;
    }
public function findTypeElement ( $ name ) { $ type = null ; $ elements = $ this -> xpath ( '//s:simpleType[@name=%s]|//s:complexType[@name=%s]' , $ name , $ name ) ; if ( $ elements -> length > 0 ) { $ type = $ elements -> item ( 0 ) ; } if ( empty ( $ type ) ) { foreach ( $ this -> referereces as $ import ) { $ type = $ import -> findTypeElement ( $ name ) ; if ( ! empty ( $ type ) ) { break ; } } } return $ type ; }
Parses the schema for a type with a specific name.

@param string $name The name of the type
@return DOMElement|null Returns the type node with the provided if it is found. Null otherwise.
Parses the schema for a type with a specific name .