java tree class to XML through jRuby on rails
I have a custom Java Tree class (from [stanford parser][1],) that I am able to work with in JRuby on Rails.

What I am trying to figure out how to do is to output this tree class to XML through rails

The tree class describes a word tree derived from a parsed sentence. Each tree may have multiple child trees depending on the structure

Here is a simple example based off of the sentence "I am a robot":

    Tree: Root
    -Tree: Sentence
    --Tree: Noun
    ---Tree: I
    --Tree: Verb
    ----Tree: am
    --Tree: Noun
    ---Tree: a
    ---Tree: robot

One important detail is that I don't need to store any of this in a database, so using ActiveRecord may not be the best choice.

Do you have any ideas about the best approach for this? I have read some ideas in tutorials, but I'm not sure what the best way for my case is, especially since I am very new to rails and don't yet understand 'the rails way'

Thanks!

  [1]: http://nlp.stanford.edu/software/lex-parser.shtml
  [2]: http://tides.umiacs.umd.edu/webtrec/stanfordParser/javadoc/overview-summary.html
java tree class to XML through jRuby on rails
===

I have a custom Java Tree class (from [stanford parser][1],) that I am able to work with in JRuby on Rails.

What I am trying to figure out how to do is to output this tree class to XML through rails

The tree class describes a word tree derived from a parsed sentence. Each tree may have multiple child trees depending on the structure

Here is a simple example based off of the sentence "I am a robot":

    Tree: Root
    -Tree: Sentence
    --Tree: Noun
    ---Tree: I
    --Tree: Verb
    ----Tree: am
    --Tree: Noun
    ---Tree: a
    ---Tree: robot

One important detail is that I don't need to store any of this in a database, so using ActiveRecord may not be the best choice.

Do you have any ideas about the best approach for this? I have read some ideas in tutorials, but I'm not sure what the best way for my case is, especially since I am very new to rails and don't yet understand 'the rails way'

Thanks!

  [1]: http://nlp.stanford.edu/software/lex-parser.shtml
  [2]: http://tides.umiacs.umd.edu/webtrec/stanfordParser/javadoc/overview-summary.html