function _endnote8_XML_export in Bibliography Module 6
Same name and namespace in other branches
- 6.2 modules/endnote/endnote8_export.inc \_endnote8_XML_export()
- 7 modules/endnote/endnote8_export.inc \_endnote8_XML_export()
- 7.2 modules/endnote/endnote8_export.inc \_endnote8_XML_export()
2 calls to _endnote8_XML_export()
- biblio_endnote_XML_export in ./
biblio.import.export.inc - Export data in EndNote XML format.
- _biblio_export in ./
biblio.import.export.inc
File
- ./
endnote8_export.inc, line 2
Code
function _endnote8_XML_export($node, $part = 'record') {
$style_attr = 'face="normal" font="default" size="100%"';
switch ($part) {
case 'begin':
$xml = '<?xml version="1.0" encoding="UTF-8"?>';
$xml .= "<xml><records>";
break;
case 'record':
$xml .= "<record>";
$xml .= '<source-app name="Biblio" version="6.x">Drupal-Biblio</source-app>';
$xml .= "<ref-type>" . _endnote8_type_map($node->biblio_type) . "</ref-type>";
unset($node->biblio_type);
//<!-- Author information -->
$xml .= en8_add_contributors($node);
$xml .= en8_add_titles($node);
$xml .= en8_add_keywords($node);
$xml .= en8_add_dates($node);
$xml .= en8_add_urls($node);
foreach ($node as $key => $value) {
$entag = en8_field_map($key);
if (!empty($entag) && !empty($value)) {
$xml .= "<" . $entag . '><style face="normal" font="default" size="100%">' . htmlspecialchars($value) . "</style></{$entag}>";
}
}
$xml .= "</record>";
break;
case 'end':
$xml .= '</records></xml>';
break;
}
return $xml;
}