If you have a basic family metamodel and if you have generated its model, edit and editor code and if you have created a ".basicfamily" model from it, you could read it using this piece of code:
URI uri = URI.createURI(new File("path of your file").getAbsolutePath());
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getPackageRegistry().put(BasicfamilyPackage.eNS_URI, BasicfamilyPackage.eINSTANCE);
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("basicfamily", new XMIResourceFactoryImpl());
Resource resource = resourceSet.getResource(uri, true);
List<EObject> contents = resource.getContents();
// now you can iterate on the root objects of your model, use EObject#getContents() to
// retrieve the children of an EObject and thus navigate in your data
If this code is running in an Eclipse plugin with your metamodel installed, some parts of this code may not be necessary (the addition of the basic family EPackage in the package registry and the registration of the resource factory) since they are handled by the plugin.xml of the generated projects.