xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Rodriguez Mota" <abraham.r...@gmail.com>
Subject Error reading the node's content (using different name spaces)
Date Wed, 03 Sep 2008 18:36:48 GMT
Hi,

I will appreciate any help to resolve this problem.
I am trying to group and access no-SVG info in a svg <g> group. So, I am
using a different name space name "xxx".
It looks that i can get the node I want but not to access to the content.
Here is the code

***SVG File
   <g id="circle1" onmousedown=startProcess(evt)>
            <circle id="circle1B" cx="50" cy="50" r="50" fill="green"/>
            <xxx:relations>c1/c2
            </xxx:relations>

        </g>
****Script
//I get the id of the element when user clicks on it
function startProcess(evt){
var targetElement=root.getElementById(elementName);
...
}
...
function updateConnections(targetElement){
var relacion=targetElement.getElementsByTagNameNS(xxx,"relations");
//var elements=relacion[relacion.length].nodeValue;
alert(relacion[0].name);

****SVG Error:

Java class "org.apache.batik.dom.AbstractParentNode$ElementsByTagNameNS" has
no public instance field or method named "0". (scri4.js#71)


Thanks

Abraham

Mime
View raw message