Return-Path: Delivered-To: apmail-xml-batik-dev-archive@xml.apache.org Received: (qmail 26655 invoked by uid 500); 1 Mar 2002 14:33:52 -0000 Mailing-List: contact batik-dev-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: batik-dev@xml.apache.org Delivered-To: mailing list batik-dev@xml.apache.org Received: (qmail 26643 invoked from network); 1 Mar 2002 14:33:52 -0000 X-Authentication-Warning: sophia.inria.fr: Host koala.ilog.fr [193.51.208.210] claimed to be Latitude341 From: "Stephane Hillion" To: Subject: RE: SVGDocument Date: Fri, 1 Mar 2002 15:32:24 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20020301102031.6AFF6F908A@elba.db.informatik.uni-kassel.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > From: Ahmad Morad [mailto:morad@db.informatik.uni-kassel.de] > Sent: vendredi 1 mars 2002 11:21 > To: batik-dev@xml.apache.org > Subject: SVGDocument > > > Hi, > > In my Applikation I read the visualization from a socket. I read the > XML-Content from the Inputstream and produce a dom Document. If this is an > HTML I use the JEditorPane swing widget to render it. If this is SVG > I want to use the JSVGCanvas widget. This became as first argument a > SVGDocument object. > > > In the batik API, the SVGDocument is a (dom) Document! > So the type cast > > Document doc; > SVGDocument svgDoc = (SVGDocument) doc; > > must be correct! However I got type a cast Ecception. It sounds > to be a small a problem, but I don't really find a way how to > create a SVGDocument from a (dom) Document. Something like: > > private SVGDocument doc2svgDoc (Document doc) { > SVGDocument svgDoc; svgDoc = (SVGDocument)org.apache.batik.dom.util.DOMUtilities.deepCloneDocument(doc, org.apache.batik.dom.svg.SVGDOMImplementation.getDOMImplementation()); > return svgDoc; > } > I have not try to compile, but it should work ;-) --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org For additional commands, e-mail: batik-dev-help@xml.apache.org