Hi Maria, The problem is that you shouldn't use the SVG namespace for the attributes on your text element.
Maria Carolina Arce Terceros <[EMAIL PROTECTED]> wrote on 01/09/2006 10:42:51 AM: > String nSvg = SVGDOMImplementation.SVG_NAMESPACE_URI; > SVGDocument doc = svgCanvas.getSVGDocument(); > Element text = doc.createElementNS(nSvg, "text"); You are ok up to here. > text.setAttributeNS(nSvg, "font-size", "15"); > text.setAttributeNS(nSvg, "fill", "black"); > text.setAttributeNS(nSvg, "x", "200"); > text.setAttributeNS(nSvg, "y", "200"); These should all be: text.setAttributeNS(null, <blah>, <blah>) Just like you do for your rect: > rect.setAttributeNS(null, "x", "100"); The only place you need to provide a namespace is for the 'xlink:href' attribute on images (where you need to use the xlink namespace). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
