function taxonomy_xml_element_data in Taxonomy import/export via XML 5.2
Same name and namespace in other branches
- 5 xml_format.inc \taxonomy_xml_element_data()
- 6.2 xml_format.inc \taxonomy_xml_element_data()
- 6 xml_format.inc \taxonomy_xml_element_data()
- 7 formats/xml_format.inc \taxonomy_xml_element_data()
Call-back function used by the XML parser.
1 string reference to 'taxonomy_xml_element_data'
- taxonomy_xml_xml_parse in ./
xml_format.inc - Initiate the parser on the custom XML schema.
File
- ./
xml_format.inc, line 100 - Include routines for the original XML parsing and taxonomy/term creation.
Code
function taxonomy_xml_element_data($parser, $data) {
global $_tx_vocabulary, $_tx_element, $_tx_terms, $_tx_term, $_tx_tag;
switch ($_tx_element) {
case 'term':
if ($_tx_tag == 'parent') {
if (trim($data)) {
$_tx_terms[$_tx_term][$_tx_tag][] = $data;
}
}
else {
$_tx_terms[$_tx_term][$_tx_tag] .= trim($data);
}
break;
default:
$_tx_vocabulary[$_tx_tag] .= trim($data);
}
}