/**
  * Search users by xml definition. Return XML
  * 
  * @access public
  * @param string $searchConditions XML definition to search with ('id','login','firstName','lastName','contactData','profile','language')
  * @return string XML definition of users IDs
  */
 static function soapSearch($searchConditions = '')
 {
     $xml = '';
     $attrs = array();
     if ($searchConditions) {
         $domdocument = new CMS_DOMDocument();
         try {
             $domdocument->loadXML($searchConditions, 0, false);
         } catch (DOMException $e) {
             CMS_profile_usersCatalog::raiseError('Parse error for xml : ' . $e->getMessage() . " :\n" . $xml);
             return $xml;
         }
         // Conditions tag must be the root tag
         $conditionsTags = $domdocument->getElementsByTagName('conditions');
         if (count($conditionsTags) == 1) {
             $conditionTags = $domdocument->getElementsByTagName('condition');
             foreach ($conditionTags as $conditionTag) {
                 $type = $conditionTag->getAttribute('type');
                 $value = $conditionTag->nodeValue;
                 $attrs[$type . '_pru'] = $value;
             }
         }
     }
     $items = CMS_profile_usersCatalog::getAll(true, false, false, $attrs);
     if ($items) {
         $xml .= '<results count="' . count($items) . '">' . "\n";
         foreach ($items as $itemID) {
             $xml .= '<result>' . $itemID . '</result>' . "\n";
         }
         $xml .= '</results>';
     }
     return $xml;
 }