-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.php
More file actions
32 lines (26 loc) · 706 Bytes
/
test.php
File metadata and controls
32 lines (26 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$xsd = __DIR__ . '/us-gaap-2018-01-31/dis/us-gaap-dis-acec-2018-01-31.xsd';
$xml = __DIR__ . '/us-gaap-2018-01-31/dis/us-gaap-dis-acec-def-2018-01-31.xml';
if (file_exists($xsd)) {
echo $xsd.'<br/>';
}
if (file_exists($xml)) {
echo $xml.'<br/>';
}
include 'DOMValidator.php';
$validator = new DomValidator($xsd);
$validated = $validator->validateFeeds($xml);
if ($validated) {
echo "Feed successfully validated";
} else {
print_r($validator->displayErrors());
}
require 'XMLValidator.php';
$validator = new XmlValidator($xsd);
$validated = $validator->validateFeeds($xml);
if ($validated) {
echo "Feed successfully validated";
} else {
print_r($validator->displayErrors());
}
?>