« Return to Thread: problem dynamically adding svg

Re: problem dynamically adding svg

by Andreas Neumann :: Rate this Message:

Reply to Author | View in Thread

in which SVG viewer/implementation?
 
ASV and Batik, e.g. don't support XMLHttpRequest. They support
getURL(). In order to support all of the viewers you must fork your
code and see which method is available. You can write a helper
object or function for this.
 
http://www.carto.net/papers/svg/resources/helper_functions.js e.g.
has a getXMLData object that you could use for that purpose.
 
In order to use it, you can write the following code:
 
var myGetXMLObj = new getXMLData(url,callBackFunction);
myGetXMLObj.getData();
 
You get back a ready to use XML node that you can either append to
the DOM (if SVG compatible) or parse per script.
 
I don't know how well it works with thousands of elements. Many of
the current SVG viewers might not be fast enough to process huge
amounts of data.
 
Andreas
 
--- In svg-developers@..., "david_bigd42" <mumrah@g...>
wrote:
>
> Here is my problem. I have a static svg file, and at various times
i
> will need to add additional svg to this document. I can do this
for a
> small number of elements with no problem via the createElementNS,
> setAttribute, and appendChild methods. But now i need to add a few
> thousand elements at a time.  
>  
> I use and xmlhttp (ajax) transfer to get the new svg. The server
> returns valid svg, and when i try to append the
xmlhttp.responseXML to
> the svg document, i get a type mismatch error thrown.  
>  
> Any ideas?
>
 






------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->

-----
To unsubscribe send a message to: svg-developers-unsubscribe@...
-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:
    svg-developers-unsubscribe@...

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


 « Return to Thread: problem dynamically adding svg