IGetPreferencesRsp::GetPreferencesXml

The GetPreferencesXml method returns the XML for the preferences requested in the GetPreferences command component.

_bstr_t bstrPreferencesXML = spIGetPreferencesRsp->GetPreferencesXml();
Parameters
None.
Results
Returns a _bstr_t, which contains the XML for the preferences requested in the GetPreferences command component.
Sample
The following is a fragment from the complete example for the GetPreferences command.
   ...
   // Initialize the custom GetPreferences command component
   // with the type of preferences to retrieve.
   PreferencesType prefType = ePreferencesTypeBootstrap;
   std::cout << "Initializing the GetPreferences command component..." << std::endl;
   spIGetPreferencesCmd->Initialize(PrefType);

   // Execute the GetPreferences command and capture the response component
   std::cout << "Executing the GetPreferences command..." << std::endl;
   IAppIntCmdPtr spIAppIntCmd(spIGetPreferencesCmd);
IAppIntRspPtr spIAppIntRsp = spIAppIntCmd->Invoke(spIAppIntSession);
... // Obtain the specific response information contained in the custom GetPreferencesRsp component IGetPreferencesRspPtr spIGetPreferencesRsp(spIAppIntRsp);
_ASSERTE(spIGetPreferencesRsp != 0);
std::cout << "PreferencesXML=" << (LPCSTR) spIGetPreferencesRsp->GetPreferencesXML() << std::endl; _bstr_t bstrXPathPreference = (_T("/Document Name")); _bstr_t bstrPreference = spIGetPreferencesRsp->GetPreference(bstrXPathPreference);
std::cout << "DocumentName=" << (LPCSTR) bstrPreference << std::endl; ...