Arvind, Sorry for the confusion. I had sent a follow on email correcting my mistake: you should use null for SVG attributes, and, as Thierry pointed out, use the SVG namespace for elements.
Vincent. Arvind Sareen wrote: > > Vincent, > > Thanks but how do i access d element of a particular path > because when I try to use the method getAttributeNS(svgNS, "d") with svgroot > which is element of document the it gives me a null value. > > Please help > > Arvind > > >From: Vincent Hardy <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: Re: To view SVG Element > >Date: Wed, 12 Dec 2001 14:17:57 +0100 > > > >Arvind, > > > >If you are trying to read the <path>'s d attribute, you need to > >use the getAttributeNS(svgNS, "d") method. > > > >Vincent. > > > >Arvind Sareen wrote: > > > > > > Hi > > > > > > I have created a SVG document and then tried to read it by converting it > > > into document. Now I want to read path elements values. > > > Please help .Below is my code. > > > > > > try > > > { > > > String parser = XMLResourceDescriptor.getXMLParserClassName(); > > > SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser); > > > String uri11 = "map.svg"; > > > // Document doc = f.createDocument(uri); > > > FileInputStream inS = new FileInputStream("map.svg"); > > > String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI; > > > DOMImplementation impl = SVGDOMImplementation.getDOMImplementation(); > > > Document doc = f.createDocument(svgNS,inS); > > > // String abc = doc.getAttributeNS(null,"path"); > > > Element abc = doc.getDocumentElement(); > > > > > > String s = abc.getAttributeNS(svgNS,"id"); > > > String as = abc.getElementsByTagNameNS(null,"path"); > > > System.out.println("11111 "+abc.getElementsByTagNameNS(null,"path")); > > > > > > }catch (Exception ex) > > > { > > > ex.printStackTrace(); > > > } > > > > > > Arvind > > > > > > _________________________________________________________________ > > > Join the world’s largest e-mail service with MSN Hotmail. > > > http://www.hotmail.com > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > _________________________________________________________________ > Join the world’s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]