You can use a traditional XmlPullParser
like described in Android documentation :
InputStream yourRemoteLayout = ...;
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
XmlPullParser parser = factory.newPullParser();
parser.setInput(yourRemoteLayout, "someEncoding");
AttributeSet attributes = Xml.asAttributeSet(parser);
Please see what's explained in XmlPullParser documentation for more details.
Edit : From LayoutInflater#inflate() documentation :
Important For performance reasons, view inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime.
What I guess, is that maybe you should make your own implementation of LayoutInflater.Factory2
if Android's own only rely on preprocessed resources.