Thomas, thanks for the hint.

Regards
Olaf

Thomas DeWeese wrote:
Hi Olaf,

Olaf Schnabel wrote:

I use the printNode command in my webproject (SVG + ECMAScript) and want to write out a part of the SVG-code (tags + content).

Example of SVG code:

<svg>
    <defs id="def">
        <circle cx="20" cy="20" r="10"/>
    </defs>
</svg>

In the Adobe SVG Viewers the following ECMAScript code works without problems:

var x = document.getElementById("def");
var y = printNode(x);

In Batik  I get an error message "printNode is not defined."

Do you have any ideas for a workaround?


   One option is to use the 'import' facilities of Rhino to
pull in one of the DOM serializers from Batik (like
org.apache.batik.dom.util.DOMUtilities), and use that
to serialize the document.

   It is also pretty easy to write a simple DOM serializer
in ECMAScript.  It wouldn't surprise me if you could find
one floating around on the net (from comments on
svg-developers I suspect that people doing real
serialization of the DOM write there own).


Thanks for your answer.

Regards
Olaf



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


-- Olaf Schnabel Department of Cartography Swiss Federal Institute of Technology (ETH) ETH Hoenggerberg, CH-8093 Zurich, Switzerland phone: ++41 44 633 3031 e-mail: [EMAIL PROTECTED] www: http://www.ika.ethz.ch/schnabel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to