protected function buildNodeTypesRequest(array $nodeTypes)
{
$xml = '<?xml version="1.0" encoding="utf-8" ?>' . '<jcr:nodetypes xmlns:jcr="http://www.day.com/jcr/webdav/1.0">';
if (empty($nodeTypes)) {
$xml .= '<jcr:all-nodetypes/>';
} else {
foreach ($nodeTypes as $nodetype) {
$xml .= '<jcr:nodetype><jcr:nodetypename>' . $nodetype . '</jcr:nodetypename></jcr:nodetype>';
}
}
$xml .= '</jcr:nodetypes>';
return $xml;
}