xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vicki Bell" <vicki.b...@avenida.co.uk>
Subject Problem with Document.getElementsByTagName("g")
Date Tue, 07 May 2002 18:09:40 GMT
Hi,
 
I am trying to convert some (pre-batik) java code that uses Xerxes to
use Batik instead. However, I can’t get the code to work. When I use
Batik to parse an SVG document from an InputStream I find that calling
getElementsByTagName(“g”) does not return the same result as when using
Xerxes. It returns an empty list, although the document contains a
number of “g” tags and I can get a “g” tag node directly by calling
getElementById (…) on the Document.
 
Attached are a test program and SVG document that illustrate the
problem. The program parses the SVG document from a FileInputStream
first using Xerxes and then using Batik and outputs the number of “g”
tags found by calling getElementsByTagName on the resulting Documents.
 
I must admit my knowledge of XML/SVG is limited (I didn’t write the code
I am converting) so apologies if I have overlooked something obvious. 
 
Am I using Batik (or Xerxes) incorrectly? Is there anything special
about “g” nodes from the perspective of Batik that I need to take
account of? If not, has anyone encountered a similar problem?
 
Thanks,
Vicki
 
---------------------------------------
Vicki Bell
Avenida Technologies Ltd
vicki.bell@avenida.co.uk
Tel: +44 (0)2476 430462
 
  _____  


Mime
View raw message