class XmlUtils
XMLUtils is a bunch of utility methods to XML operations.
This class contains static methods only and is not meant to be instantiated.
static DOMDocument | loadFile(string $file, string|callable|null $schemaOrCallable = null) Loads an XML file. | |
static array | convertDomElementToArray(DomElement $element, bool $checkPrefix = true) Converts a \DomElement object to a PHP array. | |
static mixed | phpize(mixed $value) Converts an xml value to a PHP type. |
Loads an XML file.
Converts a \DomElement object to a PHP array.
The following rules applies during the conversion:
Each tag is converted to a key value or an array if there is more than one "value"
The content of a tag is set under a "value" key (
The attributes are converted to keys ()
The nested-tags are converted to keys (
Converts an xml value to a PHP type.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Config/Util/XmlUtils.html