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 Lars Eirik Rønning <la...@gmail.com> on 2008/08/29 12:53:18 UTC
SVG text replace
Hi.
I have a svg document which contains some textnodes.
I simple would like to replace the nodeValue (that is the text which shows
up),however i get some werid class cast exceptions.
I have simply tried to use element.setNodeValue("My new text"), but this
does not work.
When i try to use setTextContent("my text) i get some errors saying this
abstract method is not provided.
Hope you can help me!
Lars
Re: SVG text replace
Posted by Lars Eirik Rønning <la...@gmail.com>.
Hi. I had forgotten to retrieve the actual textNode.. thus i was mistaken.
I managed to fix it.
Thanks!
On Fri, Aug 29, 2008 at 1:16 PM, <th...@kodak.com> wrote:
>
> Hi Lars,
>
> "Lars Eirik Rønning" <la...@gmail.com> wrote on 08/29/2008 06:53:18
> AM:
>
>
> > I have a svg document which contains some textnodes.
> > I simple would like to replace the nodeValue (that is the text which
> > shows up),however i get some werid class cast exceptions.
> > I have simply tried to use element.setNodeValue("My new text"), but
> > this does not work.
> > When i try to use setTextContent("my text) i get some errors saying
> > this abstract method is not provided.
>
> Can you post sample code. I suspect you are calling the above
> methods on the wrong element in the DOM.
>
Re: SVG text replace
Posted by th...@kodak.com.
Hi Lars,
"Lars Eirik Rønning" <la...@gmail.com> wrote on 08/29/2008 06:53:18
AM:
> I have a svg document which contains some textnodes.
> I simple would like to replace the nodeValue (that is the text which
> shows up),however i get some werid class cast exceptions.
> I have simply tried to use element.setNodeValue("My new text"), but
> this does not work.
> When i try to use setTextContent("my text) i get some errors saying
> this abstract method is not provided.
Can you post sample code. I suspect you are calling the above
methods on the wrong element in the DOM.