We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 938f5d6 commit 62b9d47Copy full SHA for 62b9d47
convert.php
@@ -44,10 +44,16 @@
44
// Load XML file
45
$file = file_get_contents($arguments['filename']);
46
47
+libxml_use_internal_errors(true);
48
+
49
$xml = str_replace('xmlns=', 'ns=', $file); //$string is a string that contains xml...
50
-$xml = new SimpleXMLElement($xml);
51
+//$xml = new SimpleXMLElement($xml);
52
+try { $xml = new SimpleXMLElement($xml, LIBXML_COMPACT | LIBXML_PARSEHUGE); } catch (Exception $e) { echo $e; }
53
54
+foreach(libxml_get_errors() as $error) {
55
+ echo "\t", $error->message;
56
+}
57
58
$result = $xml->xpath('page');
59
$count = 0;
0 commit comments