/**
	 * performs $element->xpath( $path ), but with auto-load function
	 *
	 * @param  SimpleXMLElement  $element
	 * @param  string              $path
	 * @return SimpleXMLElement[]|boolean     XML elements or FALSE
	 */
	public static function xpathWithAutoLoad( $element, $path ) {
		$viewModel					=	$element->xpath( $path );
		if ( !$viewModel ) {
			// Try autoloading view:
			if ( preg_match( '#^/(?:\*|cbxml)/(types/type|views/view|actions/action)\[[^\]]*@name="([-_a-z]+)"[^\]]*\]$#', $path, $matches ) ) {
				$subpathNameClean	=	$matches[1];		// e.g. views/view
				$viewNameClean		=	$matches[2];		// viewname of view[@name="viewname" and .... ]
				$context			=	new Context();
				if ( $context->getPluginId() ) {
					$fileNameClean	=	$context->getPluginPath() . '/xml/' . $subpathNameClean . '.' . $viewNameClean . '.xml';
				} else {
					/*
					 * No auto-loading for core files for now:
					 * $fileNameClean	=	Application::CBFramework()->getCfg( 'absolute_path' ) . '/'
					 *					.	( Application::Cms()->getClientId() == 1 ? 'administrator/' : '' )
					 *					.	'components/com_comprofiler/xmlcb/'
					 *					.	$subpathNameClean . '.' . 'com_comprofiler.' . $viewNameClean . '.xml';
					 */
					return false;
				}
				if ( is_readable( $fileNameClean ) ) {
					$viewFileXML	=	new SimpleXMLElement( $fileNameClean, LIBXML_NONET | ( defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0 ), true );
					$slashViews		=	'/*/' . substr( $subpathNameClean, 0, strpos( $subpathNameClean, '/' ) );
					$elementSubRoot	=	$element->xpath( $slashViews );
					/** @var SimpleXMLElement $elementSubRoot */
					$elementSubRoot	=	$elementSubRoot[0];
					foreach ( $viewFileXML->xpath( $subpathNameClean ) as $autoLoadView ) {
						$elementSubRoot->addChildWithDescendants( $autoLoadView );
					}
					$viewModel		=	$element->xpath( $path );
				} else {
					trigger_error( sprintf( 'RegistryEditView::xpathWithAutoLoad: For xpath %s : Unable to find auto-loading XML file: %s', $path, $fileNameClean ), E_USER_WARNING );
				}
			}
		}
		return $viewModel;
	}