On Thursday 06 September 2001 17:57, Albert Valls wrote:
> The problem is not setting the attributes, the problem is how to obtain an
> object of the class SVGOMTextElement.
>
> To Stephane Hillion: The file is loaded with this code:
>
> DocumentBuilder builder =
> DocumentBuilderFactory.newInstance().newDocumentBuilder();
> DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
> factory.setNamespaceAware(true);
> builder = factory.newDocumentBuilder();
> java.io.File file = new java.io.File(path);
> Document docTemp = builder.parse(file);
> DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
> Document doc=
> (SVGOMDocument)DOMUtilities.deepCloneDocument(docTemp,impl);
>
> Do you think here is the problem??
>
No, it should work. I suspect your documents do not have <!DOCTYPE svg ...>
declarations because the elements are not in the SVG namespace.
BTW use getElementsByTagNameNS() instead of getElementsByTagName() or the
returned list will be empty.
--
Stephane.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]