dev/core#1283 fix inability to export more than 255 chars
[civicrm-core.git] / CRM / Core / CodeGen / Util / Xml.php
1 <?php
2
3 /**
4 * Class CRM_Core_CodeGen_Util_Xml
5 */
6 class CRM_Core_CodeGen_Util_Xml {
7
8 /**
9 * @param string $file
10 * Path to input.
11 *
12 * @return SimpleXMLElement|bool
13 */
14 public static function parse($file) {
15 $dom = new DomDocument();
16 $xmlString = file_get_contents($file);
17 $dom->loadXML($xmlString);
18 $dom->documentURI = $file;
19 $dom->xinclude();
20 $xml = simplexml_import_dom($dom);
21 return $xml;
22 }
23
24 }