[Project_owners] Iframe Content to Text

Michael Vincent van Rantwijk mv_van_rantwijk at yahoo.com
Tue Oct 18 03:22:17 EDT 2005


Nathaniel Jayme wrote:
> Hello,
> 
> I am able to get the text of an iframe with html
> content using:
> 
> iframefoo.contentDocument.body.innerHTML
> 
> But I have a hard time with XML content.  I have used
> XMLSerializer without success using:
> 
>   var Serialize = new XMLSerializer()
>   var txtXML =
> Serialize.serializeToString(iframefoo.contetDocument.documentElement)
> ;
> 
> Javascript console spewd:
> 
> Error: uncaught exception: [Exception... "Access to
> restricted URI denied"  code: "1012" nsresult:
> "0x805303f4 (NS_ERROR_DOM_BAD_URI)" ...
> 
> XMLSerializer works for objects not within an Iframe.
> 
> I just want to get the content of an IFrame HTML or
> XML   as text.

Doesn't node.textContent work?

Michael


More information about the Project_owners mailing list