Re: Problems opening a SVG file

Try to use:
String url = "file://c:\file.svg"
or
String url = "file://c:/file.svg"

Took a look ar java.net.URL JavaDoc.

     Pat

On Tue, 29 Jun 2004 12:57:15 +0200, Xavier Murillo wrote
> Hi!
> 
> I'm trying to open a local SVG file to work with it but only works 
> when i use a URL.. how can i change?
> 
> my code:
> 
> ------------------this works------------------------
> String parser = XMLResourceDescriptor.getXMLParserClassName();
> SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
> String uri = "http://mywebpage.de/file.svg";
> docSVG = f.createDocument(uri);
> 
> ---------------this not works-----------------------
> String parser = XMLResourceDescriptor.getXMLParserClassName();
> SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
> String uri = "C:\\file.svg";
> docSVG = f.createDocument(uri);
> 
> -----------------------
> -----------------------
> Thank's
> 
> --
> Xavier Murillo

Received on Wednesday, 7 July 2004 14:50:11 UTC