xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Panshul Whisper <ouchwhis...@gmail.com>
Subject Dom manipulation
Date Thu, 30 May 2013 23:15:13 GMT
Hello,

I am a new user trying modify an SVG file and then render it as a JPEG.

I convert the SVG file into a w3c Document.
then I get the element that I need to update.
but when I try to update the text in that element I get the following error:

java.lang.AbstractMethodError:
org.apache.batik.dom.svg.SVGOMTextElement.getTextContent()Ljava/lang/String;

My code is as follows:

final String parser = XMLResourceDescriptor.getXMLParserClassName();
final SAXSVGDocumentFactory svgDocFactory = new
SAXSVGDocumentFactory(parser);
svgDoc = svgDocFactory.createDocument(svgUri);
final Element element = svgDoc.getElementById("MainTitle");
System.out.println("Element Text:" + element.getTextContent().toString());


Please help me how to update values of elements in the SVG Dom document.

I will be glad if you can point me to a link where I can get samples or
documentation of using the DOM api.

Thanking You,
-- 
Regards,
Ouch Whisper
010101010101

Mime
View raw message