BTW, keep in mindthat webcore runs in the sandbox process and won't
have access to the disk.

Maybe this doesn't apply for your application, but typically in Chrome
the pattern is:
 - Add a function to webkit/glue that converts a document to a string.
 - Add an IPC type to chrome/common/render_messages_internal.h that
transfers the string to the browser process.
 - Add hooks on renderer and browser sides to send/receive the message
(look at how the other messages are implemented in that file to see
examples).

On Thu, Jun 4, 2009 at 12:11 AM, Daniel Dreiberg
<daniel.dreiber...@gmail.com> wrote:
> Hi,
>
> In chromium, I am trying to use WebCore's XMLSerializer to dump the root
> node of document.
> I am able to pass all the necessary parameters to the XMLSerializer, but my
> question is XMLSerializer::serializeToString() return a Webkit's String,
> instead of chromium's String, and
> how can I write that to a file?
>
> String markup = serializer->serializeToString(documentElement->get(), ec);
>
> // Get current using document.
>     WebFrameImpl* webFrameImpl =
> static_cast<WebFrameImpl*>(webView()->GetMainFrame());
>     WebCore::Frame* frame = webFrameImpl->frame();
>
>     WebCore::Element* documentElement =
> frame->document()->documentElement();
>     if (documentElement != NULL) {
>
>
>         WebCore::ExceptionCode ec = 0;
>         PassRefPtr<WebCore::XMLSerializer> serializer =
> WebCore::XMLSerializer::create();
>
>         String markup =
> serializer->serializeToString(documentElement->get(), ec);
>
>
>     }
>
> Thank you for any ideas.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to