List Info

Thread: Batick SVG Document creating problem...




Batick SVG Document creating problem...
user name
2007-03-22 10:36:02
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-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


RE: Batick SVG Document creating problem...
country flaguser name
United States
2007-03-22 12:52:01
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: CEdwardsidbs.com [mailto:CEdwardsidbs.com]

Sent: Thursday, March 22, 2007 11:36 AM
To: batik-usersxmlgraphics.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-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


Re: Batick SVG Document creating problem...
user name
2007-03-23 15:43:09
Hi,

On Thu, 2007-03-22 at 15:36 +0000, CEdwardsidbs.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-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )