API15

JSimpleXML/loadFile

This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Syntax

Returns

boolean True if successful, false if file empty

Defined in

libraries/joomla/utilities/simplexml.php

Importing

jimport('joomla.utilities.simplexml');

Source Body

function loadFile($path,$classname=null){//Check to see of the path existsif(!file_exists($path)){returnfalse;}//Get the XML document loaded into a variable$xml=trim(file_get_contents($path));if($xml==''){returnfalse;}else{$this->_parse($xml);returntrue;}}

Examples

Content is available under Joomla! EDL unless otherwise noted.Joomla!® is a registered trademark of Open Source Matters, Inc.If you are experiencing technical issues with this website, please report it.
Notice a content problem? Create an account and fix it.