From: Ted Flethuseo Date: 2011-04-02T07:47:22+09:00 Subject: Reading XML to relational tables Hi everyone, I need to build 3 relational tables from an xml text. In this tables, I need to keep track of words that have the and tags in them along with the word mentioned and its count in the

tag. This is easier to illustrate with an example: I need to take this text:

My name is Ted, and I like coffee. Ted does not like tea.

I have a brother who likes tea but does not like coffee

To 3 normalized tables like this: ...p_table... p_id desc 1 My name is.... 2 I have a .... ...p_to_emph_table... p_id e_id count 1 2 1 2 1 1 2 2 1 ...emph_table... e_id emph_word 1 Tea 2 Coffee I am not sure what would be the best approach to parse this xml with ruby or what tool could help me do this efficiently? Any ideas appreciated, Ted. -- Posted via http://www.ruby-forum.com/.