Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with superclass method #13

Open
frosenberg opened this issue Jul 11, 2014 · 0 comments
Open

Problem with superclass method #13

frosenberg opened this issue Jul 11, 2014 · 0 comments

Comments

@frosenberg
Copy link

I run the following sample program (pretty much adapted from the wiki) and use the National Vulnerability Database XML schema and sample file as an input.

This is the sample file:

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 "=======Classes======="
classes = schema.to :ruby_classes
puts classes.collect{ |cl| !cl.nil? ?
    (cl.to_s + " < " + cl.superclass.to_s) : ""}.sort.join("\n")

This is what I'm getting:

cert-input.rb:23:in `block in <main>': undefined method `superclass' for "vuln:vulnerabilityType":String (NoMethodError)
    from cert-input.rb:23:in `collect'
    from cert-input.rb:23:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant