diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2006-05-07 18:13:23 +0000 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2006-05-07 18:13:23 +0000 |
commit | a9dd20391f84dec495706f50e66ae0e1f15cc38b (patch) | |
tree | 6f959b611b52eef258980d0950050852adf702f0 /webgli | |
parent | better spacing (diff) | |
download | scire-a9dd20391f84dec495706f50e66ae0e1f15cc38b.tar.gz scire-a9dd20391f84dec495706f50e66ae0e1f15cc38b.tar.bz2 scire-a9dd20391f84dec495706f50e66ae0e1f15cc38b.zip |
return true/false in parse()
svn path=/; revision=54
Diffstat (limited to 'webgli')
-rw-r--r-- | webgli/XMLParser.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webgli/XMLParser.php b/webgli/XMLParser.php index 1840f46..4e36346 100644 --- a/webgli/XMLParser.php +++ b/webgli/XMLParser.php @@ -54,8 +54,11 @@ class XMLParser { $this->attrs = array(); $this->xmlpath = ""; $this->chardata = ""; - xml_parse($this->parser, file_get_contents($xmlfile)); + $file_contents = file_get_contents($xmlfile); + if(!$file_contents) return false; + xml_parse($this->parser, $file_contents); xml_parser_free($this->parser); + return true; } function get($name) { @@ -111,4 +114,4 @@ class XMLParser { } } -?>
\ No newline at end of file +?> |