Commit | Line | Data |
---|---|---|
5e434adf ARW |
1 | <?php |
2 | ||
b5c2afd0 EM |
3 | /** |
4 | * Class CRM_Core_CodeGen_Util_Xml | |
5 | */ | |
5e434adf ARW |
6 | class CRM_Core_CodeGen_Util_Xml { |
7 | /** | |
6a0b768e TO |
8 | * @param string $file |
9 | * Path to input. | |
5e434adf ARW |
10 | * |
11 | * @return SimpleXMLElement|bool | |
12 | */ | |
00be9182 | 13 | public static function parse($file) { |
5e434adf | 14 | $dom = new DomDocument(); |
f9857c59 JP |
15 | $xmlString = file_get_contents($file); |
16 | $dom->loadXML($xmlString); | |
17 | $dom->documentURI = $file; | |
5e434adf ARW |
18 | $dom->xinclude(); |
19 | $xml = simplexml_import_dom($dom); | |
20 | return $xml; | |
21 | } | |
96025800 | 22 | |
5e434adf | 23 | } |