[EMAIL PROTECTED] wrote:

> I'm making a speaking web browser using Mozilla as a college project. I
> have the XPCOM framework between the browser and the Text-To-Speech
> engine set up but what I need to do now is get a hold of the currently
> displayed HTML document so that it can be sent to the TTS engine for
> speech generation. I'll be converting the HTML to "speakable" text
> within the component, so what I really need now is a way of getting a
> hold of the doc from C++. 

Depends what you mean by the "doc."  Do you literally want the 
nsIDocument object, from which you can enumerate all of the content 
nodes in the content tree yourself?  Or do you want a serialized 
representation of the text in the document (omitting the structure?)  Do 
you want the state of the document included, so that any dynamic 
manipulation and style interpretation has the intended effect?  If so, 
you certainly don't want to go anywhere near the cache, which holds the 
document in its "raw" form.  In general, I'd look how we handle the save 
and copy operations, and suggest that you grab your data in a similar 
fashion.

> There must be a pointer or handle or
> something to it somewhere right? I mean, it has to be in the cache so
> it must be copyable (yes?!?) Anyway, after I get that problem out of
> the way, my project is pretty easy so I'd love any suggestion,
> Thanx
> Shauno
> 
> 
> 
> 
> Sent via Deja.com
> http://www.deja.com/



Reply via email to