I’m trying to consuming an xml file and map it to a Ruby object that
would describe that xml file.
What would be the best way to implement the following scenario.
Let’s say I have several classes: Student, Course, Person, Tuition
Xml for this would look like this:
So basically I can parse the xml file using rexml and access all of my
xml tags and stuff.
Here is the Object I want to map it to:
@person - access Person
So the question is how do I access from class Student - class Person? So
that when I down the line later when I parse the file and do:
r = Record.new
I want to be able to do things like: