function feed_import_element_validate_xmldec in Feed Import 8
Same name and namespace in other branches
- 7.3 feed_import.module \feed_import_element_validate_xmldec()
Validates XML declaration.
1 string reference to 'feed_import_element_validate_xmldec'
- feed_import_feed_import_reader_info in ./
feed_import.module - Implements hook_feed_import_reader_info().
File
- ./
feed_import.module, line 651 - User interface, cron functions for feed_import module.
Code
function feed_import_element_validate_xmldec($element, &$form_state, $form) {
if ($element['#value'] !== '' && !preg_match("/^\\<\\?xml (.*)\\?\\>\$/", $element['#value'])) {
form_error($element, t('%title must have a valid XML declaration!', array(
'%title' => $element['#title'],
)));
}
}