Hamish McPanji
Honorary Master
- Joined
- Oct 29, 2009
- Messages
- 42,084
All of it - How sensitive is this?
Mind mailing me the code? - If not post a sample how you are phrasing and what validation is failig
PHP:<?php function libxml_display_error($error) { $return = "<br/>\n"; switch ($error->level) { case LIBXML_ERR_WARNING: $return .= "<b>Warning $error->code</b>: "; break; case LIBXML_ERR_ERROR: $return .= "<b>Error $error->code</b>: "; break; case LIBXML_ERR_FATAL: $return .= "<b>Fatal Error $error->code</b>: "; break; } $return .= trim($error->message); if ($error->file) { $return .= " in <b>$error->file</b>"; } $return .= " on line <b>$error->line</b>\n"; return $return; } function libxml_display_errors() { $errors = libxml_get_errors(); foreach ($errors as $error) { print libxml_display_error($error); } libxml_clear_errors(); } // Enable user error handling libxml_use_internal_errors(true); $xml = new DOMDocument(); $xml->load('example.xml'); if (!$xml->schemaValidate('example.xsd')) { print '<b>DOMDocument::schemaValidate() Generated Errors!</b>'; libxml_display_errors(); } ?>
https://secure.php.net/manual/en/ref.libxml.php
Yup, was recoding based on ^ for the error handling, but when I saw the type of errors in the file...it gave me pause and I went back to the original files on the source FTP server because I thought my FTP transfer was generating these. The files on the FTP server were the same
The issue is that if data integrity is bad, you are missing essential trip information . You can't have blank spots on a trip. You are also missing data records. This can only be fixed at source.
For example, one XML file I had 4 records in 1 hour . That's for 4 vehicles. These are moving vehicles....I know there was more data for that hour than 4 dots on a map