# Do you support the SimpleXML extension for PHP?

> Yes. The SimpleXML extension is available for PHP on Ruachost hosting, so your scripts can read and work with XML data easily.

Source: https://helpcenter.ruachost.com/faq/guides/do-you-support-the-simplexml-extension-for-php/

**Yes.** The **SimpleXML** extension is available for PHP on Ruachost hosting.

SimpleXML turns an XML document into a PHP object, so you can read elements and attributes with normal PHP code. It's useful for reading RSS feeds, product feeds and API responses.

```php
<?php
$xml = simplexml_load_file('feed.xml');
foreach ($xml->channel->item as $item) {
    echo $item->title . "\n";
}
```

## If you get a "Call to undefined function" error

PHP extensions are managed for each PHP version. To check that SimpleXML is switched on:

1. Log in to cPanel.
2. Open **Select PHP Version**.
3. Click **Extensions** and make sure **simplexml** (and **xml**) are ticked.

See [Changing PHP versions and settings using PHP Selector](https://helpcenter.ruachost.com/cpanel/software/changing-php-versions-and-settings-using-php-selector/).

If your script reports a "String could not be parsed as XML" error, the problem is usually the XML itself. See [Fixing the String could not be parsed as XML PHP error message](https://helpcenter.ruachost.com/developers/php/fixing-the-string-could-not-be-parsed-as-xml-php-error-message/).
