You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Dimi Shahbaz <di...@csufresno.edu> on 2003/10/25 08:11:57 UTC

Viewing text representation of the DOM in Squiggle

Hi,
Using squiggle, I can view a tree-representation of the SVG DOM using 
CTRL+D.  Is there an easy way to see a textual representation of the SVG 
DOM?

This would be the same as "View Source...", except that I am using 
javascript to add elements into document.  "View Source" does not 
reflect these new nodes, but the DOM viewer does.

Thanks,
Dimi


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Viewing text representation of the DOM in Squiggle

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Dimi,

Dimi Shahbaz wrote:

> Using squiggle, I can view a tree-representation of the SVG DOM using 
> CTRL+D.  Is there an easy way to see a textual representation of the SVG 
> DOM?
> 
> This would be the same as "View Source...", except that I am using 
> javascript to add elements into document.  "View Source" does not 
> reflect these new nodes, but the DOM viewer does.

     Well, this can in fact be quite tricky to do "right".
It should be pretty simple for you to use a DOM serializer
(batik.dom.util.DOMUtilities) to do turn the DOM tree into
text and then do the same thing as View Source does (see
batik.apps.svgbrowser.JSVGViewerFrame:1448).

     However the really tricky bit is the CSS.  So this view
would accurately reflect the DOM but not the CSS values.  We
have considered different ways to do this "correctly" but
it is in fact very difficult to do.



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org