Class: Veracode::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/veracode/parser/parser.rb

Class Method Summary collapse

Class Method Details

.parse(xml) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/veracode/parser/parser.rb', line 34

def self.parse(xml)
  parser = XML::SAXParser.new()  
  parser.options = {}
  REXML::Document.parse_stream(xml, parser)
 
  parser.stack.length > 0 ? parser.stack.pop.to_hash : {}
end