Box\Spout\Reader\Wrapper\SimpleXMLElement::__construct PHP Method

__construct() public method

Creates a new SimpleXMLElement object
See also: SimpleXMLElement::__construct
public __construct ( string $xmlData )
$xmlData string A well-formed XML string
    public function __construct($xmlData)
    {
        $this->useXMLInternalErrors();
        try {
            $this->simpleXMLElement = new \SimpleXMLElement($xmlData);
        } catch (\Exception $exception) {
            // if the data is invalid, the constructor will throw an Exception
            $this->resetXMLInternalErrorsSetting();
            throw new XMLProcessingException($this->getLastXMLErrorMessage());
        }
        $this->resetXMLInternalErrorsSetting();
    }