{"id":20720120,"url":"https://github.com/scalajs-io/xml2js","last_synced_at":"2026-04-28T16:34:31.457Z","repository":{"id":77422004,"uuid":"81410879","full_name":"scalajs-io/xml2js","owner":"scalajs-io","description":"Simple XML to JavaScript object converter.","archived":false,"fork":false,"pushed_at":"2020-01-07T17:32:30.000Z","size":20,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T07:52:26.940Z","etag":null,"topics":["node","nodejs","npm","npm-package","scala","scalajs","xml2js"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/scalajs-io.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-09T04:59:53.000Z","updated_at":"2019-06-17T23:11:51.000Z","dependencies_parsed_at":"2023-10-26T20:33:39.745Z","dependency_job_id":null,"html_url":"https://github.com/scalajs-io/xml2js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scalajs-io/xml2js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fxml2js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fxml2js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fxml2js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fxml2js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalajs-io","download_url":"https://codeload.github.com/scalajs-io/xml2js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fxml2js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["node","nodejs","npm","npm-package","scala","scalajs","xml2js"],"created_at":"2024-11-17T03:19:25.591Z","updated_at":"2026-04-28T16:34:31.442Z","avatar_url":"https://github.com/scalajs-io.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Xml2js API for Scala.js\n================================\n[xml2js](https://www.npmjs.com/package/xml2js) - Simple XML to JavaScript object converter.\n\n### Description\n\nSimple XML to JavaScript object converter. It supports bi-directional conversion. Uses sax-js and xmlbuilder-js.\n\nNote: If you're looking for a full DOM parser, you probably want [JSDom](https://github.com/scalajs-io/jsdom).\n\n### Build Dependencies\n\n* [SBT v1.2.x](http://www.scala-sbt.org/download.html)\n\n### Build/publish the SDK locally\n\n```bash\n $ sbt clean publish-local\n```\n\n### Running the tests\n\nBefore running the tests the first time, you must ensure the npm packages are installed:\n\n```bash\n$ npm install\n```\n\nThen you can run the tests:\n\n```bash\n$ sbt test\n```\n\n### Examples\n\n```scala\nimport io.scalajs.JSON\nimport io.scalajs.npm.xml2js._\nimport scalajs.js\n\nval xml = \"\u003croot\u003eHello xml2js!\u003c/root\u003e\"\nXml2js.parseString[MyObject](xml, (err, result) =\u003e {\n    println(\"results: \" + JSON.stringify(result)) // results: {\"root\":\"Hello xml2js!\"} \n    println(result.root) // Hello xml2js!\n})\n\n@js.native\ntrait MyObject extends js.Object {\n  var root: String = js.native\n}\n```\n\n### Artifacts and Resolvers\n\nTo add the `Xml2js` binding to your project, add the following to your build.sbt:  \n\n```sbt\nlibraryDependencies += \"io.scalajs.npm\" %%% \"xml2js\" % \"0.5.0\"\n```\n\nOptionally, you may add the Sonatype Repository resolver:\n\n```sbt   \nresolvers += Resolver.sonatypeRepo(\"releases\") \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalajs-io%2Fxml2js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalajs-io%2Fxml2js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalajs-io%2Fxml2js/lists"}