function Celebros_Salesperson_Model_Api_QwiserSpellerInformation($xml_SpellerInformation)
 {
     if (is_object($xml_SpellerInformation)) {
         $this->SpellingErrorDetected = $xml_SpellerInformation->get_attribute("SpellingErrorDetected");
         $this->SpellerAutoCorrection = $xml_SpellerInformation->get_attribute("SpellerAutoCorrection");
         $this->AdditionalSuggestions = GetQwiserSimpleStringCollection(current(getDomElements($xml_SpellerInformation->child_nodes())));
     }
 }
 function Celebros_Salesperson_Model_Api_QwiserSearchResults($root)
 {
     $this->xml_root = $root;
     $this->QwiserSearchResults = current($this->xml_root->get_elements_by_tagname("QwiserSearchResults"));
     $this->QwiserErrorOccurred = (bool) $this->xml_root->get_attribute("ErrorOccurred");
     $this->QwiserErrorMessage = current($this->xml_root->get_elements_by_tagname("QwiserError"));
     $this->SearchInformation = Mage::getModel('salesperson/Api_SearchInformation', current($this->xml_root->get_elements_by_tagname("SearchInformation")));
     $this->Questions = Mage::getModel('salesperson/Api_QwiserQuestions', current($this->xml_root->get_elements_by_tagname("Questions")));
     $this->SearchPath = Mage::getModel('salesperson/Api_QwiserSearchPath', current($this->xml_root->get_elements_by_tagname("SearchPath")));
     $this->Products = Mage::getModel('salesperson/Api_QwiserProducts', current($this->xml_root->get_elements_by_tagname("Products")));
     $this->QueryConcepts = Mage::getModel('salesperson/Api_QwiserConcepts', current($this->xml_root->get_elements_by_tagname("QueryConcepts")));
     $this->SpellerInformation = Mage::getModel('salesperson/Api_QwiserSpellerInformation', current($this->xml_root->get_elements_by_tagname("SpellerInformation")));
     $this->RelatedSearches = GetQwiserSimpleStringCollection(current($this->xml_root->get_elements_by_tagname("RelatedSearches")));
     $this->SpecialCasesDetectedInThisSearch = current($this->xml_root->get_elements_by_tagname("SpecialCasesDetectedInThisSearch"));
 }
 function GetReturnValue($xml_root, $ReturnValue)
 {
     switch ($ReturnValue) {
         case "QwiserSearchResults":
             return new Celebros_Conversionpro_Model_Api_QwiserSearchResults($xml_root);
             break;
         case "String":
             return $this->SimpleStringParser($xml_root);
             break;
         case "QwiserQuestions":
             return new Celebros_Conversionpro_Model_Api_QwiserQuestions(current($xml_root->get_elements_by_tagname("Questions")));
             break;
         case "QwiserProductAnswers":
             return new Celebros_Conversionpro_Model_Api_QwiserProductAnswers(current($xml_root->get_elements_by_tagname("ProductAnswers")));
             break;
         case "QwiserProductFields":
             return new Celebros_Conversionpro_Model_Api_QwiserProductFields(current($xml_root->get_elements_by_tagname("ProductFields")));
             break;
         case "QwiserSearchPath":
             return new Celebros_Conversionpro_Model_Api_QwiserSearchPath(current($xml_root->get_elements_by_tagname("SearchPath")));
             break;
         case "QwiserAnswers":
             return new Celebros_Conversionpro_Model_Api_QwiserAnswers(current($xml_root->get_elements_by_tagname("Answers")));
             break;
         case "QwiserSimpleStringCollection":
             return GetQwiserSimpleStringCollection(current($xml_root->get_elements_by_tagname("QwiserSimpleStringCollection")));
             break;
     }
 }