Mark,
> Open the .idml file in a plain text editor
An IDML file can't be opened in a text editor, you'll have to unzip it first, then go through all the XML files. You could open it and change part(s) of it in a special editor such as Oxygen. But I would go about it in a different way.
The error message says that the problem may be conditional text, locked stories and/or layers, and/or composite fonts.
If the document contains text conditions, note which conditions are applied, undo all conditions, then try the replacement again and reapply the conditions. If the document contains any locked layers or objects, note which they are, unlock them, do the replacements, then relock whatever you unlocked. And if the document contains any composite fonts, check whether the problem font is in the composite font and if it is, change the problem font in the composite font.
The first two (test text conditions and locked layers/objects) are easy to script, the third, composite fonts, isn't. You'll have to do that manually. (Unfortunately InDesign doesn't have a native composite-font editor, unlike Illustrator. There's one in this plug-in: http://in-tools.com/products/plugins/world-tools-pro/)
P.
... View more