protected function xmlToColumns($xml, $propertyNames)
{
$data = new \stdClass();
$dom = new \DOMDocument('1.0');
$dom->loadXml($xml);
$dom->formatOutput = true;
$xpath = new \DOMXPath($dom);
$columns = array();
$propertyEls = array();
foreach ($propertyNames as $propertyName) {
$els = $xpath->query(sprintf('.//sv:property[@sv:name="%s"]', $propertyName));
if ($els->length === 0) {
continue;
}
$propertyEl = $els->item(0);
$this->mapPropertyFromElement($propertyEl, $data);
}
return $data;
}