The way to do this is to encapsulate your registration into an Autofac module, which can be registered from XML. (The modules are described here: http://code.google.com/p/autofac/wiki/StructuringWithModules )
Your module will look something like this:
public class MyModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.Register(c => MyFactory.GetMyObject()).As<IMyObject>();
}
}
And the XML for registering it:
<module type="MyModule" />
source
share