xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmad Morad <mo...@db.informatik.uni-kassel.de>
Subject Creating SVGDocument from a Document ?
Date Thu, 28 Feb 2002 15:41:22 GMT

Hi,

The JSVGCanvas.etSVGDocument() becames a VGDocument object. How could 
I produce (cast) such an object from a "normal" DOM Document?


--
public void viewTable(Document svgNode) 
	throws IOException, TransformerConfigurationException, 
	       TransformerException 
    {
	// Muß herausfinden wie ich aus dem DOM einen SVGDocument erzeuge
	// SVGDocument node = (SVGOMDocument) svgNode ;

	DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
	SVGOMDocument node = new SVGOMDocument(null, impl) ;
	
	// node.copyInto((Node) svgNode);
	node.importNode((Node) svgNode,true);
	viewport.setSVGDocument((SVGDocument) node);

    }
--

Thanks,
Morad.

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


Mime
View raw message