W3C home > Mailing lists > Public > www-svg@w3.org > June 2002

Re: SVG --> HTML/TXT for searching and accessibility

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Wed, 12 Jun 2002 10:40:43 +0200
Message-ID: <3D07090B.9060508@pinkjuice.com>
To: www-svg@w3.org
CC: Dean Jackson <dean@w3.org>

Dean Jackson wrote:

> Alternatively, you could write a program that
> ignores everything within angle brackets (bonus points to
> anyone who can do this in a program of 25 characters or
> less!)
> If you have suggestions for improvement or if you do actually
> write a program to do the same thing, let me know and I'll
> link it from the page. I'll also include the smallest perl/python/ruby/etc
> script anyone comes up with to extract text from an SVG 
> file.

Although I agree with Dave's points, here's one more overly simplistic 


   <desc id="foo">my granny on the balkony</desc>

ary =

ary.each do |element_name,text|
  puts element_name+': '+text

# prints:
title: granny
desc: my granny on the balkony
text: 2002


Received on Wednesday, 12 June 2002 04:39:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:53 UTC