{"id":21398965,"url":"https://github.com/ekzo-dev/ruby-xsd","last_synced_at":"2026-01-03T02:41:41.609Z","repository":{"id":157645194,"uuid":"631893841","full_name":"ekzo-dev/ruby-xsd","owner":"ekzo-dev","description":"Ruby XSD spec implementation","archived":false,"fork":false,"pushed_at":"2024-04-26T09:14:00.000Z","size":558,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-26T21:49:08.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ekzo-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-24T09:31:20.000Z","updated_at":"2024-04-26T09:14:04.000Z","dependencies_parsed_at":"2024-11-22T15:12:16.398Z","dependency_job_id":"dadaf1c9-dbe8-4bfb-b488-3ae69f13bf35","html_url":"https://github.com/ekzo-dev/ruby-xsd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekzo-dev%2Fruby-xsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekzo-dev%2Fruby-xsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekzo-dev%2Fruby-xsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekzo-dev%2Fruby-xsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekzo-dev","download_url":"https://codeload.github.com/ekzo-dev/ruby-xsd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243891954,"owners_count":20364609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T15:12:14.669Z","updated_at":"2026-01-03T02:41:41.583Z","avatar_url":"https://github.com/ekzo-dev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XSD\n[![Gem Version](https://badge.fury.io/rb/xsd.svg)][gem]\n[![Ruby](https://github.com/ekzo-dev/ruby-xsd/actions/workflows/main.yml/badge.svg)][githubactions]\n\n[gem]: https://badge.fury.io/rb/xsd\n[githubactions]: https://github.com/omniauth/omniauth/actions/workflows/main.yml\n\nThe Ruby XSD library is an [XML Schema](https://www.w3.org/2001/XMLSchema) implementation for Ruby. Provides easy and\nflexible access to XSD information.\n\n## Installation\n\nInstall as a gem\n\n    $ gem install xsd\n\nOr add it to your Gemfile\n\n```ruby\ngem 'xsd'\n```\n\n## Usage\n\n```ruby\nrequire 'xsd'\n\n# Load ruby-xsd\nreader = XSD::XML.open('some.xsd')\n\n# Get element by name with hash lookup \nelement = reader['NewReleaseMessage']\n\n# Get element by namespace + name with hash lookup\nelement = reader['{http://ddex.net/xml/ern/36}NewReleaseMessage']\n\n# Get element child elements\nelement.collect_elements.map(\u0026:name) # =\u003e ['MessageHeader', 'UpdateIndicator', 'IsBackfill', 'CatalogTransfer', 'WorkList', 'CueSheetList', 'ResourceList', 'CollectionList', 'ReleaseList', 'DealList']\n\n# Get attributes\nattribute = reader['NewReleaseMessage']['@MessageSchemaVersionId']\n\n# Get attribute information\nattribute.name # =\u003e 'MessageSchemaVersionId'\nattribute.type # =\u003e 'xs:string'\nattribute.data_type # =\u003e 'string'\nattribute.required? # =\u003e true\nattribute.optional? # =\u003e false\nattribute.prohibited? # =\u003e true\n\n# Get element information\nelement = reader['NewReleaseMessage']['ResourceList']['SoundRecording'] # =\u003e XSD::Element\nelement.min_occurs # =\u003e 0\nelement.max_occurs # =\u003e :unbounded\nelement.type # =\u003e 'ern:SoundRecording'\nelement.complex_type # =\u003e XSD::ComplexType\nelement.complex_content? # =\u003e true\nelement.simple_content? # =\u003e false\nelement.mixed_content? # =\u003e false\nelement.multiple_allowed? # =\u003e true\nelement.required? # =\u003e false\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can\nalso run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the\nversion number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,\npush git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ruby-xsd. This project is intended\nto be a safe, welcoming space for collaboration, and contributors are expected to adhere to\nthe [code of conduct](https://github.com/[USERNAME]/ruby-xsd/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Ruby::Xsd project's codebases, issue trackers, chat rooms and mailing lists is expected to\nfollow the [code of conduct](https://github.com/[USERNAME]/ruby-xsd/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekzo-dev%2Fruby-xsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekzo-dev%2Fruby-xsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekzo-dev%2Fruby-xsd/lists"}