# the request is in pseudo-osm format... this is kind-of an
# abuse, maybe should change to some other format?
- doc = XML::Parser.string(request.raw_post).parse
+ doc = XML::Parser.string(request.raw_post, :options => XML::Parser::Options::NOERROR).parse
doc.find("//osm/node").each do |n|
lon << n["lon"].to_f * GeoRecord::SCALE
lat << n["lat"].to_f * GeoRecord::SCALE
new_preferences = {}
- doc = XML::Parser.string(request.raw_post).parse
+ doc = XML::Parser.string(request.raw_post, :options => XML::Parser::Options::NOERROR).parse
doc.find("//preferences/preference").each do |pt|
if preference = old_preferences.delete(pt["k"])
# Read in xml as text and return it's Node object representation
def self.from_xml(xml, create = false)
- p = XML::Parser.string(xml)
+ p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR)
doc = p.parse
doc.find("//osm/node").each do |pt|
TYPES = %w(node way relation).freeze
def self.from_xml(xml, create = false)
- p = XML::Parser.string(xml)
+ p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR)
doc = p.parse
doc.find("//osm/relation").each do |pt|
# Read in xml as text and return it's Node object representation
def self.from_xml(xml, create = false)
- p = XML::Parser.string(xml)
+ p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR)
doc = p.parse
doc.find("//osm/gpx_file").each do |pt|
# Read in xml as text and return it's Way object representation
def self.from_xml(xml, create = false)
- p = XML::Parser.string(xml)
+ p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR)
doc = p.parse
doc.find("//osm/way").each do |pt|