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

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:


My code is as follows:

final String parser = XMLResourceDescriptor.getXMLParserClassName();
final SAXSVGDocumentFactory svgDocFactory = new
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,
Ouch Whisper

View raw message