Skip to content

Instantly share code, notes, and snippets.

View simonmd's full-sized avatar

Simon Rascovsky MD, M.Sc simonmd

View GitHub Profile
@simonmd
simonmd / ps_template_parser.rb
Created March 27, 2012 19:04 — forked from elskwid/ps_template_parser.rb
Powerscribe templates XML parsing
#!/usr/bin/env ruby
require 'rexml/document'
include REXML
#open the XML file exported from Powerscribe
# Ruby lets us open the file in a block (thereby closing it when it's done)
File.open("Voice.xml") do |file|
# The "block" is that do ... end syntax and |file| is a reference to the file we've opened
doc = Document.new(file)