Suppress XML parsing errors.
This technique was already used in app/models/changeset.rb This suppresses the error messages when parsing invalid XML, but the exceptions are still raised, as tested in test_from_xml_double_lat in test/models/node_test.rb
This commit is contained in:
parent
7725cd59b4
commit
f464e2a6e9
6 changed files with 6 additions and 6 deletions
|
@ -36,7 +36,7 @@ class Relation < ActiveRecord::Base
|
|||
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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue