Hi Tilo, Andreas,
"Andreas Neumann" <[EMAIL PROTECTED]> wrote on 09/17/2008 04:21:17 AM:
> I only know how to do this with ECMAScript/Javascript. I am not a Java
> programmer, but it should work similarly.
>
> Suppose you have:
>
> <text id="myText" x="20" y="50">Some Text</text>
>
> in ECMAScript you would do the following:
>
> var myTextContent = document.getElementById("myText").firstChild;
> var textLength = myTextContent.getComputedTextLength;
I don't think you should have the 'firstChild' on the first line.
The TextContent Interface is defined on the text elements (text, tspan,
probably tref) not on the text content it's self.
Also there is a pretty comprehensive example (also in ecma script)
in Batik at 'samples/tests/spec/scripting/text_content.svg'.