Hi Pires,

pires7 <[EMAIL PROTECTED]> wrote on 12/21/2006 10:41:25 PM:

> I understand that a SVG file is first converted into a SVG document and 
then
> rendered on the display canvas (squiggle) using the createDocument() 
> provided by org.w3c.dom.DOMImplementation. Am i right to say that the
> createElementNS()  and setAttribute() methods will add additional 
elements
> and attributes into the SVG document but it will not affect the original 
SVG
> txt file?

   Correct any modifications to the DOM (the in memory version
of the Document) only apply to the in memory version unless you
decide to serialize and store that over the original.

> Second question is that i would like to add the tspan element under the
> textPath element

> i believe this can be done easily using the createElement() to add tspan 
and

   Actually make sure you use 'createElementNS' with the SVG namespace.

> setAttribute() to add dy='1.5'

   Also correct (the most correct thing is to use 'setAttributeNS'
with null as the namespace in this case).

> but is there any way to add the SARKIES ROAD under my tspan element?

   Use Document.creatTextNode("SARKIES ROAD"), then append the
returned Node to the tspan you created with 'appendChild'.


Reply via email to