You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Cameron McCormack <ca...@mcc.id.au> on 2008/03/06 01:11:16 UTC

Re: SetAttributeNS compile error?

Hi.

adambomb:
> I am trying to run the sample code for Batik  but I am getting all types of
> compile time errors.
> I have all the batik jar files in my library which include batik-svg-dom.jar
> as well,
> But when I try to use the method by making an object of Element class, it
> throws me the compile error.
> 
> Do I need some more jar files in order to do that?
> 
> 
>   DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
>     String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
>     Document doc = impl.createDocument(svgNS, "svg", null);
>     
>     // Get the root element (the 'svg' element).
>     Element svgRoot = doc.getDocumentElement();
>     
>     // Set the width and height attributes on the root 'svg' element.
>     svgRoot.setAttributeNS(null,"width","400");.....................this is
> where I get the error
>     svgRoot.setAttributeNS(null, "height", "450");................this is
> where I get the error

Those lines look OK to me, and any barely-recent JRE will include the
DOM Level 2 org.w3c.dom.Element interface.  Can you post you exact
compilation error messages?

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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