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 Todd O'Bryan <to...@mac.com> on 2004/04/07 10:43:31 UTC

Text element

Stupid newbie question:

How do I create a <text> element using the DOM API?

I teach high school and one of my advanced students is trying to do 
text display in SVG, but neither of us can figure out how to do it 
programmatically with the DOM. We understand that

<text x="10" y="20">my pretty text</text>

should be all we need, but we can't figure out how to get the "my 
pretty text" into the element. (After lots of previous work with JDOM, 
I expected to find a setContent() or setText() method somewhere in the 
Element hierarchy, but darned if it's not there.

If someone could provide a real simple example in the flavor of the 
rectangle example at

http://xml.apache.org/batik/domapi.html

my student and I would both be very grateful.

Thanks,
Todd


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