{"id":26241579,"url":"https://github.com/a6b8/xml-tree-viewer-for-ruby","last_synced_at":"2025-06-28T01:34:53.002Z","repository":{"id":56898787,"uuid":"380640424","full_name":"a6b8/xml-tree-viewer-for-ruby","owner":"a6b8","description":"A .xml string will do up to a easy readable tree strcuture for terminal output.","archived":false,"fork":false,"pushed_at":"2022-01-21T02:30:34.000Z","size":778,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T01:48:48.837Z","etag":null,"topics":["atom","nokogiri","rss","ruby","xml"],"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/a6b8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-27T03:13:27.000Z","updated_at":"2022-01-01T18:25:22.000Z","dependencies_parsed_at":"2022-08-21T01:50:26.599Z","dependency_job_id":null,"html_url":"https://github.com/a6b8/xml-tree-viewer-for-ruby","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/a6b8%2Fxml-tree-viewer-for-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a6b8%2Fxml-tree-viewer-for-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a6b8%2Fxml-tree-viewer-for-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a6b8%2Fxml-tree-viewer-for-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a6b8","download_url":"https://codeload.github.com/a6b8/xml-tree-viewer-for-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243369743,"owners_count":20280065,"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":["atom","nokogiri","rss","ruby","xml"],"created_at":"2025-03-13T08:32:13.473Z","updated_at":"2025-03-13T08:32:14.600Z","avatar_url":"https://github.com/a6b8.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/custom/xml-tree-viewer-for-ruby.svg\" height=\"45px\" name=\"# Xml Tree Viewer for Ruby\" alt=\"Xml Tree Viewer\"\u003e\n\u003c/a\u003e\n\nA .xml string will do up to a easy readable tree strcuture for terminal output.\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/examples.svg\" height=\"45px\" name=\"examples\" alt=\"Examples\"\u003e\n\u003c/a\u003e\n\n\n### Detail\n**Code**\n```ruby\nrequire 'xml_tree_viewer'\n\nxml = XmlTreeViewer.helper()\nXmlTreeViewer.generate( xml, :detail )\n```\n**Output**\n```txt\nTREE OVERVIEW\n    employees\n    doc.css('employees')\n    ┗━  employee\n        doc.css('employees \u003e employee:nth-of-type(1)')\n        ┗━  fullname\n            doc.css('employees \u003e employee:nth-of-type(1) \u003e fullname')\n    ┗━  employee\n        doc.css('employees \u003e employee:nth-of-type(2)')\n        ┗━  fullname\n            doc.css('employees \u003e employee:nth-of-type(2) \u003e fullname')\n```\n\n\n### Short \n**Code**\n```ruby\nrequire 'xml_tree_viewer'\n\nxml = XmlTreeViewer.helper()\nXmlTreeViewer.generate( xml, :short )\n```\n\n**Output**\n```txt\nTREE OVERVIEW\n    employees\n    ┗━  employee\n        ┗━  fullname\n    ┗━  employee\n        ┗━  fullname\n```\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003ca href=\"#headline\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/table-of-contents.svg\" height=\"45px\" name=\"table-of-contents\" alt=\"Table of Contents\"\u003e\n\u003c/a\u003e\n\n\n1. [Examples](#examples)\u003cbr\u003e\n2. [Quickstart](#quickstart)\u003cbr\u003e\n3. [Setup](#setup)\u003cbr\u003e\n4. [Methods](#methods)\u003cbr\u003e\n5. [Contributing](#contributing)\u003cbr\u003e\n6. [Limitations](#limitations)\u003cbr\u003e\n7. [Credits](#credits)\u003cbr\u003e\n8. [License](#license)\u003cbr\u003e\n9. [Code of Conduct](#code-of-conduct)\u003cbr\u003e\n10. [Support my Work](#support-my-work)\u003cbr\u003e\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/quickstart.svg\" height=\"45px\" name=\"quickstart\" alt=\"Quickstart\"\u003e\n\u003c/a\u003e\n\n```ruby\nrequire '../lib/xml_tree_viewer'\n\nxml = XmlTreeViewer.helper()\nXmlTreeViewer.generate( xml, :detail )\n```\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/setup.svg\" height=\"45px\" name=\"setup\" alt=\"Setup\"\u003e\n\u003c/a\u003e\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'xml_tree_viewer'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install xml_tree_viewer\n\n\nOn Rubygems: \n- Gem: https://rubygems.org/gems/xml_tree_viewer\n- Profile: https://rubygems.org/profiles/a6b8\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/methods.svg\" height=\"45px\" name=\"methods\" alt=\"Methods\"\u003e\n\u003c/a\u003e\n\n### .helper()\nOutput a sample xml string\n```ruby\nxml = XmlTreeViewer.helper()\n```\n\n### .generate()\nGenerate xml tree from string input\n```ruby\nXmlTreeViewer.generate( \n    xml, \n    mode \n)\n```\n\n\n**Input**\n| **Type** | **Required** | **Description** | **Example** | **Description** |\n|------:|:------|:------|:------|:------| \n| **xml** | ```String``` | Yes | \"Test\" | Define path structure |\n| **mode** | ```Symbol``` | Yes | ```:detail``` | Set console mode. Use ```:detail```, ```:short``` or ```:silent``` |\n\n**Return**\u003cbr\u003e\nBoolean\n  \n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/contributing.svg\" height=\"45px\" name=\"contributing\" alt=\"Contributing\"\u003e\n\u003c/a\u003e\n\nBug reports and pull requests are welcome on GitHub at https://github.com/a6b8/xml-tree-viewer-for-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/a6b8/xml-tree-viewer-for-ruby/blob/master/CODE_OF_CONDUCT.md).\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/limitations.svg\" height=\"45px\" name=\"limitations\" alt=\"Limitations\"\u003e\n\u003c/a\u003e\n\n- Tested for Rss and Atom Feeds.\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/credits.svg\" height=\"45px\" name=\"credits\" alt=\"Credits\"\u003e\n\u003c/a\u003e\n\nThis gem depend on following gems:\n\n- [nokogiri](https://rubygems.org/gems/nokogiri)\u003cbr\u003e\n- [active_support](https://rubygems.org/gems/activesupport)\u003cbr\u003e\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/license.svg\" height=\"45px\" name=\"license\" alt=\"License\"\u003e\n\u003c/a\u003e\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/code-of-conduct.svg\" height=\"45px\" name=\"code-of-conduct\" alt=\"Code of Conduct\"\u003e\n\u003c/a\u003e\n    \nEveryone interacting in the xml-tree-viewer-for-ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/a6b8/xml-tree-viewer-for-ruby/blob/master/CODE_OF_CONDUCT.md).\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg href=\"#table-of-contents\" src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/star-us.svg\" height=\"45px\" name=\"star-us\" alt=\"Star us\"\u003e\n\u003c/a\u003e\n\nPlease ⭐️ star this Project, every ⭐️ star makes us very happy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa6b8%2Fxml-tree-viewer-for-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa6b8%2Fxml-tree-viewer-for-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa6b8%2Fxml-tree-viewer-for-ruby/lists"}