classes/phing/tasks/ext/XmlPropertyTask.php
protected function loadFile(PhingFile $file)
    {
        $this->log("Loading " . $file->getAbsolutePath(), Project::MSG_INFO);
        try { // try to load file
            if ($file->exists()) {
                $parser = new XmlFileParser();
                $parser->setCollapseAttr($this->_collapseAttr);
                $parser->setKeepRoot($this->_keepRoot);
                $parser->setDelimiter($this->_delimiter);

                $properties = $parser->parseFile($file);

                return new Properties($properties);
            } else {
                if ($this->getRequired()) {
                    throw new BuildException("Could not load required properties file.");
                } else {
                    $this->log(
                        "Unable to find property file: " . $file->getAbsolutePath() . "... skipped",
                        Project::MSG_WARN
                    );
                }
            }
        } catch (IOException $ioe) {
            throw new BuildException("Could not load properties from file.", $ioe);
        }
    }
protected function loadFile(PhingFile $file)
    {
        $this->log("Loading " . $file->getAbsolutePath(), Project::MSG_INFO);
        try { // try to load file
            if ($file->exists()) {
                $parser = new XmlFileParser();
                $parser->setCollapseAttr($this->_collapseAttr);
                $parser->setKeepRoot($this->_keepRoot);
                $parser->setDelimiter($this->_delimiter);

                $properties = $parser->parseFile($file);

                return new Properties($properties);
            } else {
                if ($this->getRequired()) {
                    throw new BuildException("Could not load required properties file.");
                } else {
                    $this->log(
                        "Unable to find property file: " . $file->getAbsolutePath() . "... skipped",
                        Project::MSG_WARN
                    );
                }
            }
        } catch (IOException $ioe) {
            throw new BuildException("Could not load properties from file.", $ioe);
        }
    }
protected function loadFile ( PhingFile $ file ) { $ this -> log ( "Loading " . $ file -> getAbsolutePath ( ) , Project :: MSG_INFO ) ; try { // try to load file if ( $ file -> exists ( ) ) { $ parser = new XmlFileParser ( ) ; $ parser -> setCollapseAttr ( $ this -> _collapseAttr ) ; $ parser -> setKeepRoot ( $ this -> _keepRoot ) ; $ parser -> setDelimiter ( $ this -> _delimiter ) ; $ properties = $ parser -> parseFile ( $ file ) ; return new Properties ( $ properties ) ; } else { if ( $ this -> getRequired ( ) ) { throw new BuildException ( "Could not load required properties file." ) ; } else { $ this -> log ( "Unable to find property file: " . $ file -> getAbsolutePath ( ) . "... skipped" , Project :: MSG_WARN ) ; } } } catch ( IOException $ ioe ) { throw new BuildException ( "Could not load properties from file." , $ ioe ) ; } }
load properties from an XML file.

@param  PhingFile $file
@throws BuildException
@return Properties
load properties from an XML file .