HRESULT CProjectDBI::LoadPOUs (CXMLArchive &ar)
{
    try
    {
        if (!ar.MoveDown (DBI_XML_TARGET))
        {
            return (S_OK);
        };
    }
    catch (HRESULT hr)
    {
        return (hr);
    };

    try
    {
        do
        {
            try
            {
                HRESULT hr;
                CComObject<CConfigurationDBI> *pConfigurationDBI;
                CComBSTR sName;

                hr = CComObject<CConfigurationDBI>::CreateInstance (&pConfigurationDBI);
                if (FAILED (hr))
                {
                    throw hr;
                };
                ASSERT (pConfigurationDBI != NULL);
                if (pConfigurationDBI == NULL)
                {
                    throw E_UNEXPECTED;
                };
                pConfigurationDBI->AddRef ();

                hr = pConfigurationDBI->Init (m_pContext, ar);
                if (FAILED (hr))
                {
                    pConfigurationDBI->Release ();
                    throw hr;
                };

                pConfigurationDBI->AddRef ();
                pConfigurationDBI->AddParent (this);
                m_Configurations.Add (pConfigurationDBI);

                pConfigurationDBI->Release ();
            }
            catch (HRESULT)
            {

                // Do not stop reading configurations just
                // because one configuration is corrupt.

            };
        } while (ar.MoveNext ());
    }
    catch (HRESULT hr)
    {
        try
        {
            ar.MoveUp ();
        }
        catch (HRESULT)
        {
        };

        return (hr);
    };

    try
    {
        ar.MoveUp ();
    }
    catch (HRESULT hr)
    {
        return (hr);
    };

    return (S_OK);
}