[Project_owners] DOM Element Contents

Nathan R. Yergler nathan at yergler.net
Fri Feb 13 09:26:53 EST 2004


Thanks; that works great!

NRY

Doron Rosenberg wrote:

> innerHTML only works on HTML, as its non-standard.
>
> You want to look at the DOMSerializer, the interfaces are at 
> http://unstable.elemental.com/mozilla/build/latest/mozilla/extensions/dox/interfacensIDOMSerializer.html 
>
>
> Nathan R. Yergler wrote:
>
>> I'm working on a problem right now where I want to extract some of 
>> the current document's markup as a string.  The 
>> document.documentElement.innerHTML method works for HTML documents, 
>> but when working with SVG it's undefined.  I can get a handle to an 
>> Element object, but not HTMLElement (where it appears the innerHTML 
>> method is defined).  Any suggestions for retrieving the contents of 
>> an Element as a string?  Thanks.
>>
>> Nathan R. Yergler
>>
>> _______________________________________________
>> Project_owners mailing list
>> Project_owners at mozdev.org
>> http://mozdev.org/mailman/listinfo/project_owners
>
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>


More information about the Project_owners mailing list