Method: Xampl::XamplObject#new_from_xml_file

Defined in:
lib/xamplr/xampl-object.rb

#new_from_xml_file(file_name, id = nil, tokenise = true) ⇒ Object



252
253
254
255
256
257
258
# File 'lib/xamplr/xampl-object.rb', line 252

def new_from_xml_file(file_name, id=nil, tokenise=true)
  thing = FromXML.new.parse(file_name, tokenise)
  if thing.indexed_by then
    thing.set_the_index(id) if id
    self << thing if thing.get_the_index
  end
end