Strange xml node deserialization error

I have exported a static object “by node” to an xml file.
When I instantiate the object using Scene::InstantiateXML, I get an error message in the console about my xml file not being a valid model.
The call returns successfully - the returned node has a staticmodel component with a valid model resource which works in the scene perfectly…

            auto e = cache->GetResource<XMLFile>(ModelName)->GetRoot();
            Node* newnode = node_->GetScene()->InstantiateXML(e,Vector3::ZERO, Quaternion::IDENTITY);

This issue was resolved - it was a simple logical error in the code I use to instantiate models.
My code was attempting to locate named models in the resourcecache even when the filepath indicated that it should be loading from xml. Since my code was returning a valid object, I failed to notice the bug which resided early in the function in question.