[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

getElementById on a SVG object

Guillaume Rosset

7/27/2006 9:18:00 AM

Hi all, I would like to know if it is possible to retreive a SVG object
(in fact an image in a vector format that needs aa Adobe plugin to be
displayed) by writing something like

mySVGObject = ie.document.getElementById(SVGId);

?

Then if it works, is it possible to explore the SVG XML tree with the
same getElementById method (SVG image is represented as an XML file).

Thanks for your help.

--
Posted via http://www.ruby-....

2 Answers

Dr Nic

7/27/2006 10:12:00 AM

0

You might get some answers on a Javascript or SVG forum.

Cheers
Nic

--
Posted via http://www.ruby-....

James Britt

7/27/2006 5:02:00 PM

0

Guillaume Rosset wrote:
> Hi all, I would like to know if it is possible to retreive a SVG object
> (in fact an image in a vector format that needs aa Adobe plugin to be
> displayed) by writing something like
>
> mySVGObject = ie.document.getElementById(SVGId);
>
> ?
>
> Then if it works, is it possible to explore the SVG XML tree with the
> same getElementById method (SVG image is represented as an XML file).

Look at the API for REXML, the XML parser that comes with Ruby.

http://www.ruby-doc.org/stdlib/libdoc/r...

For example

my_xml_dom_obj.elements.to_a( "//[@id=#{SVGId}]" ).first


--
James Britt

"To predict the behavior of ordinary people in advance, you only have to
assume that they will always try to escape a disagreeable situation with
the smallest possible expenditure of intelligence."
- Friedrich Nietzsche