The attached XSLTs enable you to recover taxon names from a taXMLit marked up file.
In taXMLit several elements contain taxonomic material as explained in the taXMLit documentation page. These XSLTs work with the TaxonName element.
The XSLTs are:
The output from the XSLTs are attached as Result_ files.
Note:
Attachment | Size |
---|---|
extractTaxonNamePartOne.txt | 806 bytes |
extractTaxonNamePartTwo.txt | 769 bytes |
result_extractTaxonNamePartOne.txt | 84.42 KB |
result_extractTaxonNamePartTwo.txt | 17.25 KB |
extractTaxonName.txt | 676 bytes |
result_extractTaxonName.txt | 64.11 KB |
extractTaxonNameSortUnique.txt | 824 bytes |
result_extractTaxonNameSortUnique.txt | 22.42 KB |
Comments
And in PHP/DOM too
Should you wish to avoid the mysteries of XPath statements this PHP script will also extract the TaxonName nodes. It manages the XML file through the document object model, and so can be manipulated using the same techniques as though the source document was a web page. Note, this is a quick and dirty example for I have hard coded the input file Gold_BCA.xml within the script:
<?php
$dom = new DomDocument();
$dom -> load('Gold_BCA.xml');
echo('Taxon names in Gold_BCA.xml are: ');
$TaxonNames = $dom -> getElementsByTagName('TaxonName');
foreach($TaxonNames as $node) {
echo($node -> textContent . "\n");
}
?>