/******************************************************************** RssParseFromFile - parses out an RSS channel from a file path. *********************************************************************/ extern "C" HRESULT DAPI RssParseFromFile( __in_z LPCWSTR wzRssFile, __out RSS_CHANNEL **ppChannel ) { Assert(wzRssFile); Assert(ppChannel); HRESULT hr = S_OK; RSS_CHANNEL *pNewChannel = NULL; IXMLDOMDocument *pixdRss = NULL; hr = XmlLoadDocumentFromFile(wzRssFile, &pixdRss); ExitOnFailure(hr, "Failed to load RSS string as XML document."); hr = ParseRssDocument(pixdRss, &pNewChannel); ExitOnFailure(hr, "Failed to parse RSS document."); *ppChannel = pNewChannel; pNewChannel = NULL; LExit: ReleaseObject(pixdRss); ReleaseRssChannel(pNewChannel); return hr; }
DAPI_(HRESULT) BalManifestLoad( __in HMODULE hBootstrapperApplicationModule, __out IXMLDOMDocument** ppixdManifest ) { HRESULT hr = S_OK; LPWSTR sczPath = NULL; hr = PathRelativeToModule(&sczPath, BAL_MANIFEST_FILENAME, hBootstrapperApplicationModule); ExitOnFailure1(hr, "Failed to get path to bootstrapper application manifest: %ls", BAL_MANIFEST_FILENAME); hr = XmlLoadDocumentFromFile(sczPath, ppixdManifest); ExitOnFailure2(hr, "Failed to load bootstrapper application manifest '%ls' from path: %ls", BAL_MANIFEST_FILENAME, sczPath); LExit: ReleaseStr(sczPath); return hr; }
extern "C" HRESULT DAPI LocLoadFromFile( __in_z LPCWSTR wzWxlFile, __out WIX_LOCALIZATION** ppWixLoc ) { HRESULT hr = S_OK; IXMLDOMDocument* pixd = NULL; hr = XmlLoadDocumentFromFile(wzWxlFile, &pixd); ExitOnFailure(hr, "Failed to load WXL file as XML document."); hr = ParseWxl(pixd, ppWixLoc); ExitOnFailure(hr, "Failed to parse WXL."); LExit: ReleaseObject(pixd); return hr; }