function _biblio_AtoX in Bibliography Module 6.2
Helper function to ...
Parameters
array $array:
$DOM:
$root:
1 call to _biblio_AtoX()
- biblio_xml_export in includes/
biblio_xml.inc - Generates XML output containing all biblio content and their revisions.
File
- includes/
biblio_xml.inc, line 54 - XML related functions for Drupal biblio module.
Code
function _biblio_AtoX($array, $DOM = NULL, $root = NULL) {
foreach ($array as $key => $value) {
if ($key == 'biblio_contributors') {
$name = 'contributor';
}
if (is_numeric($key)) {
$key = 'c_' . $key;
}
if (is_array($value) && count($value)) {
$subroot = $root
->appendChild($DOM
->createElement($key));
_biblio_AtoX($value, $DOM, $subroot);
}
else {
if (!empty($value)) {
$root
->appendChild($DOM
->createElement($key, htmlspecialchars($value, ENT_QUOTES)));
}
}
}
return $DOM;
}