Adding links to a document
James Burton <[email protected]> Thu, 08 Aug 2013 23:25:06 +0100
| Newsgroups | gmane.text.xml.batik.user |
|---|---|
| Message-ID | <[email protected]> |
I'm new to using batik, and I want to turn all text elements in an
SVGDocument into links which pass the text to a callback. Can you point
me to an example of something similar? I'm finding the text elements
like this:
SVGDocument doc = ...
Element svgRoot = doc.getDocumentElement();
NodeList labels = svgRoot.getElementsByTagNameNS("*", "text");
Node n;
for(int i=0;i<labels.getLength();i++) {
n = labels.item(i);
log.info("A label:"+n.getFirstChild().getNodeValue());
//presumably, replace n with a link element that contains n?
}
Thanks in advance,
Jim
___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________