Re: Parse SVG from String

"Lars Ruoff" <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <0D776E6A361E4C0DA329AC245FE2C13A@qbert>
Thanks Daniel,
I'll give it a try.

I'm currently experimenting with another technique, that is to use inline 
SVG in HTML by manipulating the DOM tree directly from within a Java Applet.
Btw, do you folks know of any consistent way to do that?
The way described here
http://download.oracle.com/javase/tutorial/deployment/applet/manipulatingDOMFromApplet.html
didn't work in the sense that the elements obtained did not allow me to set 
their HTML content.

regards,
Lars


----- Original Message ----- 
From: "Daniel Westheide" <[email protected]>
To: <[email protected]>
Sent: Monday, May 23, 2011 7:33 AM
Subject: Re: Parse SVG from String


> Hello Lars,
>
>> is it possible to parse a string containing SVG-tags to build the SVG
>> document?
>> SAXSVGDocumentFactory.createDocument seems to take only an URI as
>> argument.
>> But I have the SVG content in form of a String which i want to display in
>> a
>> JSVGCanvas.
>
> You have to create a StringReader from your String and pass that to the 
> SAXSVGDocumentFactory#createDocument(String, Reader) method. The URI that 
> you pass as the first parameter as a String will be the base document URI 
> of the SVG document. This should only be important if your SVG references 
> any external files.
>
> Best regards,
>
> Daniel
> -- 
> NEU: FreePhone - kostenlos mobil telefonieren!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.