protected function MigrateItemsXML::getElementValue in Migrate 6.2
Same name and namespace in other branches
- 7.2 plugins/sources/xml.inc \MigrateItemsXML::getElementValue()
Get an element from the itemXML based on an xpath.
Return value
string
1 call to MigrateItemsXML::getElementValue()
- MigrateItemsXML::getItemID in plugins/
sources/ xml.inc - Get the item ID from the itemXML based on itemIDXpath.
File
- plugins/
sources/ xml.inc, line 540 - Support for migration from XML sources.
Class
- MigrateItemsXML
- Implementation of MigrateItems, for providing a list of IDs and for retrieving a parsed XML document given an ID from this list.
Code
protected function getElementValue($itemXML, $xpath) {
$value = NULL;
if ($itemXML) {
$result = $itemXML
->xpath($xpath);
if ($result) {
$value = (string) $result[0];
}
}
return $value;
}