{"id":20900556,"url":"https://github.com/phpbench/tabular","last_synced_at":"2025-05-13T01:32:28.647Z","repository":{"id":36517967,"uuid":"40823691","full_name":"phpbench/tabular","owner":"phpbench","description":"Transform an XML document into a tabular data set. Better than spreadsheets.","archived":false,"fork":false,"pushed_at":"2016-01-18T09:26:00.000Z","size":670,"stargazers_count":9,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T03:56:12.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpbench.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-16T14:44:33.000Z","updated_at":"2024-07-17T19:54:41.000Z","dependencies_parsed_at":"2022-08-23T22:00:08.768Z","dependency_job_id":null,"html_url":"https://github.com/phpbench/tabular","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbench%2Ftabular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbench%2Ftabular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbench%2Ftabular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbench%2Ftabular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpbench","download_url":"https://codeload.github.com/phpbench/tabular/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253854090,"owners_count":21974221,"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-18T11:20:42.792Z","updated_at":"2025-05-13T01:32:28.175Z","avatar_url":"https://github.com/phpbench.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tabular\n=======\n\n![tabularlogo-2](https://cloud.githubusercontent.com/assets/530801/9979505/11e271ce-5f71-11e5-85e1-b76b17b06609.png)\n\n[![Build Status](https://travis-ci.org/phpbench/tabular.svg?branch=master)](https://travis-ci.org/phpbench/tabular)\n[![StyleCI](https://styleci.io/repos/40823691/shield)](https://styleci.io/repos/40823691)\n\nTabular is a library for transforming a source XML document into a tabular XML\ndocument using a given configuration. The resulting tabular XML document can\nthen transformed or used to easily render tables (for example in HTML or in\nthe console).\n\nTabular is better than spreadsheets.\n\nDocumentation\n-------------\n\nSee the [official documentation](http://tabular.readthedocs.org).\n\nExample\n-------\n\nThe central concept is the definition file:\n\n```javascript\n{\n    \"rows\": [\n        {\n            \"cells\": [\n                {\n                    \"name\": \"title\",\n                    \"expr\": \"string(./title)\"\n                },\n                {\n                    \"name\": \"price\",\n                    \"expr\": \"number(./price)\"\n                }\n            ],\n            \"with_query\": \"//book\"\n        },\n        {\n            \"cells\": [\n                {\n                    \"name\": \"price\",\n                    \"expr\": \"sum(//price)\"\n                }\n            ]\n        }\n    ]\n}\n````\n\nThe above definition will generate a table representation in XML with a row\nfor each `\u003cbook/\u003e` element in the given XML file and provide an additional row\nshowing the sum of all the `\u003cprice/\u003e` elements of the `\u003cbook/\u003e` element.\n\nSo given the following XML file:\n\n```xml\n    \u003c?xml version=\"1.0\"?\u003e\n    \u003cstore\u003e\n        \u003cbook\u003e\n            \u003ctitle\u003eWar and Peace\u003c/title\u003e\n            \u003cprice\u003e5.00\u003c/price\u003e\n        \u003c/book\u003e\n        \u003cbook\u003e\n            \u003ctitle\u003eOne Hundered Years of Soliture\u003c/title\u003e\n            \u003cprice\u003e7\u003c/price\u003e\n        \u003c/book\u003e\n    \u003c/store\u003e\n````\n\nThe generated table might look like this (as rendered by the [Tabular\nCLI](https://github.com/phpbench/tabular-cli)):\n\n```\n┌────────────────────────────────┬───────┐\n│ title                          │ price │\n├────────────────────────────────┼───────┤\n│ War and Peace                  │ 5     │\n│ One Hundered Years of Soliture │ 7     │\n│                                │ 12    │\n└────────────────────────────────┴───────┘\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpbench%2Ftabular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpbench%2Ftabular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpbench%2Ftabular/lists"}