// public
// @return true if parsed successfully, false otherwise
function parse($xml_data) {
+ $result = false;
$this->element_path = array();
$this->character_data = '';
- xml_parse($this->parser, $xml_data, TRUE);
+ $result = xml_parse($this->parser, $xml_data, TRUE);
+ return $result;
}
// private
function endElement($parser, $name) {
//check element path
$current_pos = count($this->element_path) - 1;
- $last_element = $this->element_path[$current_pos - 1];
switch($name) {
case 'title':