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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to