english/libraries/joomla/form/form.php
/**
	 * Method to load the form description from an XML file.
	 *
	 * The reset option works on a group basis. If the XML file references
	 * groups that have already been created they will be replaced with the
	 * fields in the new XML file unless the $reset parameter has been set
	 * to false.
	 *
	 * @param   string  $file     The filesystem path of an XML file.
	 * @param   string  $replace  Flag to toggle whether form fields should be replaced if a field
	 *                            already exists with the same group/name.
	 * @param   string  $xpath    An optional xpath to search for the fields.
	 *
	 * @return  boolean  True on success, false otherwise.
	 *
	 * @since   11.1
	 */
Method to load the form description from an XML file.
The reset option works on a group basis. If the XML file references
groups that have already been created they will be replaced with the
fields in the new XML file unless the $reset parameter has been set
to false.

@param   string  $file     The filesystem path of an XML file.
@param   string  $replace  Flag to toggle whether form fields should be replaced if a field
already exists with the same group/name.
@param   string  $xpath    An optional xpath to search for the fields.

@return  boolean  True on success, false otherwise.


Method to load the form description from an XML file . The reset option works on a group basis . If the XML file references groups that have already been created they will be replaced with the fields in the new XML file unless the $reset parameter has been set to false . @param string $file The filesystem path of an XML file . @param string $replace Flag to toggle whether form fields should be replaced if a field already exists with the same group / name . @param string $xpath An optional xpath to search for the fields . @return boolean True on success false otherwise .
public function loadFile($file, $reset = true, $xpath = false)
	{
		if (!is_file($file)) {
			$file = JPath::find(self::addFormPath(), strtolower($file).'.xml');
			if (!$file) {
				return false;
			}
		}
		$xml = JFactory::getXML($file, true);
		return $this->load($xml, $reset, $xpath);
	}
public function loadFile ( $ file , $ reset = true , $ xpath = false ) { if ( ! is_file ( $ file ) ) { $ file = JPath :: find ( self :: addFormPath ( ) , strtolower ( $ file ) . '.xml' ) ; if ( ! $ file ) { return false ; } } $ xml = JFactory :: getXML ( $ file , true ) ; return $ this -> load ( $ xml , $ reset , $ xpath ) ; }
Method to load the form description from an XML file.
Method to load the form description from an XML file .
// Check to see if the path is an absolute path. // Not an absolute path so let's attempt to find one using JPath. // If unable to find the file return false. // Attempt to load the XML file.