I currently do something like this with the mozilla sources directly (version 1.7.1). I don't recommend doing it however as it is a pig to use and you are digging around in the internal Mozilla classes. Plus the method that we used (nsIWebShell) has now been removed (hence the reason we are still at 1.7.1) and I haven't had a chance to see what the current method of doing the same thing is.

What I need to do is:
  * parse a HTML document (or fragment)
  * traverse and modify the DOM
  * rewrite the HTML document to source

All of this is done with no UI in a server process. I have had a look at the embedding API, but it seems to assume a GUI. It would be great if there was some way to do this via the Mozilla embedding interface.

Regards,
Brodie


[EMAIL PROTECTED] wrote:
Hello,
Michael Hutchinson wrote:
On 6 Dec 2006 07:32:21 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I'd like to do it in cpp. Is there something like mozdom4cpp?
The Mozilla DOM *is* C++ :) However, you'll need to learn XPCOM.

Sorry, I admit this was a stupid question.
So I can call nsIDomDocument from the nsIWebNavigation. If I understood
it in the right way I have to implement nsIWebBrowserChrome to make it
work. For this I have to do (or know) a lot of things I don't need if I
only want to parse a page and access the DOM tree. I'm just wondering
if there's not an easier solution to embed gecko for that reason.

Best regards,

Andreas
You can see a list of all the DOM objects, interfaces etc at
http://www.xulplanet.com/references/xpcomref/group_W3CDOM.html

--
Michael Hutchinson
http://mjhutchinson.com

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to