how to identify linked objects

Hi, I have a script that exports a blender scene where each object is exported as an xml node and it has the associated mesh name as an attribute. This is so that a scene can have many objects that all link to the same mesh (and so I can use mesh instancing to render tham).
All is fine when the meshes are all part of the same blend file. The problem comes when the mesh is linked from another .blend file (in the manner that is done in yo frankie). In this case, the object does not seem to have any children.
How do I detect using python if an object has a mesh object that is linked from another blend file and then retrive it’s name. This is shown in the object window of the GUI, so I guess the information is available. I’ve looked at the LibData class but that only deals with adding a linked object and not in querying the existance of a linked object.

Ian

ah - found it. Appears if there is no datablock linked then I need to look if there is a DupliGroup and the link is stored in there.