I have a html document with an emtpy, embedded svg document.
I want to fill this svg document with dojo from an xml file containing
a rect element.
First i tried to create a new rectangle (in code, object called rect)
and add it to the svg. That worked in IE, not in firefox.

The next step was to load the rect from the svg file and add it to the
svg document too.
But this won't work.

Although both svgrect and rect show "rect" as its nodeName in the
alert, only the rect object gets drawn in svg.
Code:

XML file:
<response><g id="layer00"><rect width="463.91238" height="431.20969"
x="15" y="42" id="landschap0"></rect></g></response>

The HTML/Javascript:
dojo.io.bind({
url: "http://yamaha/ggis/frag.xml";,
mimetype: "text/xml",
load: function(type, xml, e) {
var svgrect = xml.firstChild.firstChild.firstChild;
var svgdoc = document.embeds["svgmap"].getSVGDocument();
var group = svgdoc.createElement("g");
var rect = svgdoc.createElement("rect");
//set some attributes on rect and svgrect
//...
alert(rect.nodeName);
alert(svgrect.nodeName);
group.appendChild(rect);
group.appendChild(svgrect);
svgdoc.getElementById("svgmap").appendChild(group);

Does anyone know what i am doing wrong?
It seams that the types of rect and svgrect are different.

greetings 








-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to