You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ahmad Morad <mo...@db.informatik.uni-kassel.de> on 2002/03/06 14:01:33 UTC

SVGDocument

Hi all,

I have a small problem, but I don't really find a good solution!

1. The "SVGDocument" is an implementation of the Document interface. 
   I want to read XML data from a socket, so I have an InputStream, from
   which I  want to produce a SVGDocument. (There are some methods for        
   creating it from an uri not from a stream!). I don't have a complate       
   overview but there is no method for example to tell a dom parser           
  (DocumentBuilder) to use a specific DOMImplementation for parsing the XML.  
   something like:

DocumentBuilder parser = ...
parser.setDomImplementation(SVGDOMImplementation);
parser.parse(inputStream);
SVGDocument svgDoc = parser.getDocument();
 
How could I produce a SVGDocument from an InputStream containing (SVG) 
XML-Data? 


2. I find there is a big problem converting from a Document
   from one specific dom ("Plain DOM", SVG Dom, ...) implementation to        
   another. I guess there are some problems in the batik implementation of    
   the cloneNode, and importNode methods. Is it really necessary to deeply
   copy the hole dom tree in order to "cast" an Document to an SVGDocument?
   I think a method like 

   SVGDocument SVGDomImplementation.createDocument(Document dom)

   will be easier to use! 

Thanks, 
Morad.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org