Sounds like you're needing to navigate into two nested iframes to get where you need to go. It would be more helpful to see a representative sample of the HTML you're trying to automate. Assuming the HTML looks something like this:
<html>
<body>
<!-- Yes, I know this isn't really how it looks. I'm forcing hierarchical elements to simulate the iframe -->
<iframe id="editorcontainer">
<html>
<body>
<iframe id="outerdocbody">
<html>
<body>
<!-- this is the item you want the innerHTML of -->
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>
I'd probably do something like this:
// Switch to the first frame
WebElement containerFrame = driver.findElement("editorcontainer");
driver.switchTo().frame(containerFrame);
// Switch to the nested frame.
// Note that findElement is restricted to look within the currently "focused" frame.
WebElement outerDocBodyFrame = driver.findElement("outerdocbody");
driver.switchTo().frame(outerDocBodyFrame);
// Get the innerHTML property of the documentElement
// Note that likewise, JavaScript is executed in the context of the currently "focused" frame.
String content = (String)((JavascriptExecutor)driver).executeScript("return document.documentElement.innerHTML;");
// Return back to the top-level document
driver.switchTo().defaultContent();
Hope this helps. If this example doesn't exactly mimic the structure of the actual document you're automating against, you can use the concepts here to extrapolate the proper steps.
--Jim