All pastes #211466 Raw Edit

Untitled

public text v1 · immutable
#211466 ·published 2006-10-20 10:16 UTC
rendered paste body
// xml resource ...
// http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml


// this is in my xml2array object ...

    $this->resParser = xml_parser_create ();
    xml_set_object($this->resParser,$this);
    xml_set_element_handler($this->resParser, "tagOpen", "tagClosed");

    xml_set_character_data_handler($this->resParser, "tagData");

    $this->strXmlData = xml_parse($this->resParser,$strInputXML );

    if(!$this->strXmlData) {
      die(sprintf("XML error: %s at line %d",
                  xml_error_string(xml_get_error_code($this->resParser)),
                  xml_get_current_line_number($this->resParser)));
    }

// result on page is 

XML error: Empty document at line 1