Error handling

When loading a file, exceptions of type XML_XRD_Exception may be thrown. All other parts of the code do not throw exceptions but fail gracefully by returning null, e.g. when a property does not exist.

Using loadFile() may result in PHP warnings like:

Warning: simplexml_load_file(https://example.org/) failed to open stream: Connection refused

This cannot be prevented properly, so you either have to silence it with @ or fetch the file manually and use loadString().

Accessing properties (Previous) Generating XRD files (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.