Albert,

Wouldn't something like the following work for you?

    Nodelist n = document.getElementsByTagName("text");
    Element e = n.item(0);
    e.setAttribute ("x", "100");
    e.setAttribute ("y", "100");

In any event I believe the following line is incorrect:

   SVGOMTextElement textE = (SVGOMTextElement)list.item(i);

Because SVGOMTextElement is an interface, and I do not believe you can
used a casting operation on an interface.  You should be able to eliminate
the cast, (SVGOMTextElement)

Dave

> I need a SVGTextElement or it's implementing class SVGOMTextElement in witch
> are many methods I need to manipulate the position of the text. (I know many
> of them are not already implemented). One of the methods is the getBBox()
> for example.
>
> This is my code:
>
>     NodeList list = svgRoot.getElementsByTagName("text");
>
>     int listLength = list.getLength();
>     int i = 0;
>     while ( i < listLength ) {
>              Node aux = list.item(i);
>             ....
>             ....
>              SVGOMTextElement textE = (SVGOMTextElement)list.item(i);
> <<< Here is the problem
>             ....
>              i++;
>     }
>
> thank's Dave.
> Albert.


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

Reply via email to