Hallo,
ich habe in inkskape ein SVG-Template gebastelt.
folgender Code lädt mir die SVG-Datei:
jetzt habe ich in der template.svg einen Text stehen, den ich gerne per java-code überschreiben möchte. im SVG schaut die Zeile für den Text so aus:
[XML]<text
inkscape:label="txtName"
id="txtName"
y="560.22021"
x="822.04724"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.77165353;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
style="font-size:22px;stroke-width:1.77165353;stroke-miterlimit:4;stroke-dasharray:none"
y="560.22021"
x="822.04724"
id="tspan4473"
sodipodi:role="line">Exportprozess.pdf</tspan></text>[/XML]
wie kann ich aus meinem JAVA Code da drauf zugreifen?!
danke für eure Tips,
guni
ich habe in inkskape ein SVG-Template gebastelt.
folgender Code lädt mir die SVG-Datei:
Java:
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
String uri = "http://www.w3.org/2000/svg";
doc = (SVGDocument)f.createDocument(uri, new FileReader("template.svg"));
[XML]<text
inkscape:label="txtName"
id="txtName"
y="560.22021"
x="822.04724"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.77165353;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
style="font-size:22px;stroke-width:1.77165353;stroke-miterlimit:4;stroke-dasharray:none"
y="560.22021"
x="822.04724"
id="tspan4473"
sodipodi:role="line">Exportprozess.pdf</tspan></text>[/XML]
wie kann ich aus meinem JAVA Code da drauf zugreifen?!
danke für eure Tips,
guni