{"id":28566813,"url":"https://github.com/salsify/xml_convert","last_synced_at":"2025-06-10T15:39:17.226Z","repository":{"id":5581738,"uuid":"6787807","full_name":"salsify/xml_convert","owner":"salsify","description":"XmlConvert is a Ruby implementation of the .NET XmlConvert class. It encodes and decodes XML names, giving you an easy way to create NCName-compliant names from arbitrary strings.","archived":false,"fork":false,"pushed_at":"2013-06-14T16:54:45.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":42,"default_branch":"master","last_synced_at":"2024-04-08T15:40:39.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/salsify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-21T00:45:15.000Z","updated_at":"2024-04-08T15:40:39.845Z","dependencies_parsed_at":"2022-09-22T03:02:54.695Z","dependency_job_id":null,"html_url":"https://github.com/salsify/xml_convert","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fxml_convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fxml_convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fxml_convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fxml_convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salsify","download_url":"https://codeload.github.com/salsify/xml_convert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fxml_convert/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259104095,"owners_count":22805808,"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":"2025-06-10T15:39:09.102Z","updated_at":"2025-06-10T15:39:17.211Z","avatar_url":"https://github.com/salsify.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XmlConvert\n\nXmlConvert is a Ruby implementation of the [.NET XmlConvert class](http://msdn.microsoft.com/en-us/library/e2104c2x.aspx). It encodes and decodes XML names, giving you an easy way to create NCName-compliant names from arbitrary strings.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'xml_convert'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install xml_convert\n\n## Usage\n\n### Encoding\n\nEncode a name:\n\n```ruby\nencoded_name = XmlConvert.encode_name(\"My Name\") # \"My_x0020_Name\"\n```\n\nEncode a local name, escaping colons as well:\n\n```ruby\nencoded_name = XmlConvert.encode_local_name(\"Foo: Bar\") # \"Foo_x003a__x0020_Bar\"\n```\n\n### Decoding\n\nAny of the above [Encoding examples](#encoding) can be reversed with `XmlConvert.decode_name(name)`.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsify%2Fxml_convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalsify%2Fxml_convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsify%2Fxml_convert/lists"}