You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by CE...@idbs.com on 2007/03/22 16:36:02 UTC
Batick SVG Document creating problem...
Hi,
I have the XML string representation of an SVG file. I need to create an
SVGDocument of this. From looking at the API, this only seems possible by
using a URI with the SAXSVGDocumentFactory class, what is the best way to
do it with just the SVG String I have?
Many thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Batick SVG Document creating problem...
Posted by Tonny Kohar <to...@kiyut.com>.
Hi,
On Thu, 2007-03-22 at 15:36 +0000, CEdwards@idbs.com wrote:
> Hi,
>
> I have the XML string representation of an SVG file. I need to create an
> SVGDocument of this. From looking at the API, this only seems possible by
> using a URI with the SAXSVGDocumentFactory class, what is the best way to
> do it with just the SVG String I have?
You could wrap you string into InputStream, so SAXSVGDocumentFactory
could load it. The batik SAXDocumentFactory accept InputStream eg:
StringReader reader = new StringReader(yourString);
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
doc = f.createSVGDocument(reader);
Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
RE: Batick SVG Document creating problem...
Posted by "Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil>.
Hi,
Maybe you can use the
org.apache.batik.transcoder.TranscoderInput/TranscoderOutput classes?
Get an InputStream to your String (TranscoderInput) and a Document for
TranscoderOuput? I haven't tried it before, but it seems like the way
to go.
Michael Bishop
-----Original Message-----
From: CEdwards@idbs.com [mailto:CEdwards@idbs.com]
Sent: Thursday, March 22, 2007 11:36 AM
To: batik-users@xmlgraphics.apache.org
Subject: Batick SVG Document creating problem...
Hi,
I have the XML string representation of an SVG file. I need to create an
SVGDocument of this. From looking at the API, this only seems possible
by
using a URI with the SAXSVGDocumentFactory class, what is the best way
to
do it with just the SVG String I have?
Many thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org