Skip to content

Parsing National Vulnerability XML file fails #14

Open
@frosenberg

Description

@frosenberg

I have the following sample program:

require 'rxsd'

xsd_uri = "http://nvd.nist.gov/schema/nvd-cve-feed_2.0.xsd"
xml_uri = "http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml"

schema = RXSD::Parser.parse_xsd :uri => xsd_uri

puts "=======Objects======="
data = RXSD::Parser.parse_xml :uri => xml_uri
objs = data.to :ruby_objects, :schema => schema
objs.each {  |obj|
    puts "#{obj}"
}

As a result I get this:

=======Objects=======
/Library/Ruby/Gems/2.0.0/gems/rxsd-0.5.2/lib/rxsd/builders/ruby_object.rb:24:in `build': undefined method `new' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/rxsd-0.5.2/lib/rxsd/translator.rb:118:in `block in to'
    from /Library/Ruby/Gems/2.0.0/gems/rxsd-0.5.2/lib/rxsd/translator.rb:114:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/rxsd-0.5.2/lib/rxsd/translator.rb:114:in `to'
    from cert-input.rb:23:in `<main>'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions