xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: what is the difference?
Date Fri, 10 Nov 2006 11:51:25 GMT
Hi Peppe,

Peppe <peppe.delia@gmail.com> wrote on 11/09/2006 09:45:42 AM:

> what is the difference between these methods?
> 
> DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
> String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
> Document doc = impl.createDocument(svgNS, "svg", null);

    This creates an empty document.

> try {
>     String parser = XMLResourceDescriptor.getXMLParserClassName();
>     SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
>     String uri = "http://...";
>     Document doc = f.createDocument(uri);
> } catch (IOException ex) 

   This creates a document that is populated with the contents of
URI.  Once the document is created there isn't any real difference
(other than it's contents).

> if i must to load i svgfile and then i want to add new shape(rect,circle
> ecc) to loaded file,  what method to use?

   The second one.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message