{"id":29471993,"url":"https://github.com/funcool/tubax","last_synced_at":"2025-07-14T14:08:36.514Z","repository":{"id":30791594,"uuid":"34348588","full_name":"funcool/tubax","owner":"funcool","description":"Clojurescript XML parser","archived":false,"fork":false,"pushed_at":"2021-05-20T08:36:39.000Z","size":101,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-10T20:56:10.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funcool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-21T19:46:08.000Z","updated_at":"2025-01-31T20:38:51.000Z","dependencies_parsed_at":"2022-08-09T06:00:05.169Z","dependency_job_id":null,"html_url":"https://github.com/funcool/tubax","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/funcool/tubax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funcool%2Ftubax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funcool%2Ftubax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funcool%2Ftubax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funcool%2Ftubax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funcool","download_url":"https://codeload.github.com/funcool/tubax/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funcool%2Ftubax/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265305516,"owners_count":23743892,"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-07-14T14:08:32.975Z","updated_at":"2025-07-14T14:08:36.501Z","avatar_url":"https://github.com/funcool.png","language":"JavaScript","readme":"tubax\n========\nhttp://en.wikipedia.org/wiki/Tubax\n\n\u003cblockquote\u003e\nWhile the timbre of the E♭ tubax is more focused and compact than that of the full-sized contrabass saxophone.\n\u003c/blockquote\u003e\n\n## Rationale\nCurrently there is no good way to parse XML and other markup languages with Clojurescript. There are no Clojurescript-based libraries and most of the Javascript ones require access to the DOM.\n\nThis last point is critical because HTML5 Web Workers don't have access to these APIs so an alternative is necessary.\n\nAlso we're aiming to be fully compatible with the clojure.xml format so we can use helping functions inside the Clojure library.\n\n## Usage\n\n[![Clojars Project](http://clojars.org/funcool/tubax/latest-version.svg)](http://clojars.org/funcool/tubax)\n\n*Tubax* uses behind the scenes [sax-js](https://github.com/isaacs/sax-js) a very lightweight library for for XML parsing based on SAX (simple api for xml).\n\nYou can check full documentation here: http://funcool.github.io/tubax\n\nA basic usage example:\n\n```clojure\n(def xml \"\u003crss version=\\\"2.0\\\"\u003e\n           \u003cchannel\u003e\n             \u003ctitle\u003eRSS Title\u003c/title\u003e\n             \u003cdescription\u003eThis is an example of an RSS feed\u003c/description\u003e\n             \u003clink\u003ehttp://www.example.com/main.html\u003c/link\u003e\n             \u003clastBuildDate\u003eMon, 06 Sep 2010 00:01:00 +0000 \u003c/lastBuildDate\u003e\n             \u003cpubDate\u003eSun, 06 Sep 2009 16:20:00 +0000\u003c/pubDate\u003e\n             \u003cttl\u003e1800\u003c/ttl\u003e\n             \u003citem\u003e\n               \u003ctitle\u003eExample entry\u003c/title\u003e\n               \u003cdescription\u003eHere is some text containing an interesting description.\u003c/description\u003e\n               \u003clink\u003ehttp://www.example.com/blog/post/1\u003c/link\u003e\n               \u003cguid isPermaLink=\\\"false\\\"\u003e7bd204c6-1655-4c27-aeee-53f933c5395f\u003c/guid\u003e\n               \u003cpubDate\u003eSun, 06 Sep 2009 16:20:00 +0000\u003c/pubDate\u003e\n             \u003c/item\u003e\n             \u003citem\u003e\n               \u003ctitle\u003eExample entry2\u003c/title\u003e\n               \u003cdescription\u003eHere is some text containing an interesting description.\u003c/description\u003e\n               \u003clink\u003ehttp://www.example.com/blog/post/1\u003c/link\u003e\n               \u003cguid isPermaLink=\\\"false\\\"\u003e7bd204c6-1655-4c27-aeee-53f933c5395f\u003c/guid\u003e\n               \u003cpubDate\u003eSun, 06 Sep 2009 16:20:00 +0000\u003c/pubDate\u003e\n             \u003c/item\u003e\n           \u003c/channel\u003e\n         \u003c/rss\u003e\")\n\n(core/xml-\u003eclj xml)\n\n;; =\u003e {:tag :rss :attributes {:version \"2.0\"}\n;;       :content\n;;       [{:tag :channel :attributes {}\n;;         :content\n;;         [{:tag :title :attributes {} :content [\"RSS Title\"]}\n;;          {:tag :description :attributes {} :content [\"This is an example of an RSS feed\"]}\n;;          {:tag :link :attributes {} :content [\"http://www.example.com/main.html\"]}\n;;          {:tag :lastBuildDate :attributes {} :content [\"Mon, 06 Sep 2010 00:01:00 +0000\"]}\n;;          {:tag :pubDate :attributes {} :content [\"Sun, 06 Sep 2009 16:20:00 +0000\"]}\n;;          {:tag :ttl :attributes {} :content [\"1800\"]}\n;;          {:tag :item :attributes {}\n;;           :content\n;;           [{:tag :title :attributes {} :content [\"Example entry\"]}\n;;            {:tag :description :attributes {} :content [\"Here is some text containing an interesting description.\"]}\n;;            {:tag :link :attributes {} :content [\"http://www.example.com/blog/post/1\"]}\n;;            {:tag :guid :attributes {:isPermaLink \"false\"} :content [\"7bd204c6-1655-4c27-aaaa-111111111111\"]}\n;;            {:tag :pubDate :attributes {} :content [\"Sun, 06 Sep 2009 16:20:00 +0000\"]}]}\n;;          {:tag :item :attributes {}\n;;           :content\n;;           [{:tag :title :attributes {} :content [\"Example entry2\"]}\n;;            {:tag :description :attributes {} :content [\"Here is some text containing an interesting description.\"]}\n;;            {:tag :link :attributes {} :content [\"http://www.example.com/blog/post/2\"]}\n;;            {:tag :guid :attributes {:isPermaLink \"false\"} :content [\"7bd204c6-1655-4c27-aeee-53f933c5395f\"]}\n;;            {:tag :pubDate :attributes {} :content [\"Sun, 06 Sep 2009 16:20:00 +0000\"]}]}]}]}\n```\n\nThis data structure is fully compatible with the XML zipper inside `clojure.zip`\n\n```\n(require '[clojure.zip :as z])\n\n(-\u003e xml core/xml-\u003eclj\n    z/xml-zip\n    z/down\n    z/down\n    z/rightmost\n    z/node\n    :content\n    first)\n\n;; =\u003e \"Example entry2\"\n```\n\n## License\n\nLicensed under [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuncool%2Ftubax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuncool%2Ftubax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuncool%2Ftubax/lists"}