{"id":15543313,"url":"https://github.com/gromnan/welldom","last_synced_at":"2025-09-05T20:39:12.875Z","repository":{"id":2658036,"uuid":"3648900","full_name":"GromNaN/Welldom","owner":"GromNaN","description":"XML toolbox for PHP","archived":false,"fork":false,"pushed_at":"2020-02-20T08:45:08.000Z","size":55,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-16T02:15:41.998Z","etag":null,"topics":["xml","xml-document","xpath"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/GromNaN.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":"2012-03-07T12:38:46.000Z","updated_at":"2024-05-05T23:05:44.000Z","dependencies_parsed_at":"2022-08-28T05:31:24.990Z","dependency_job_id":null,"html_url":"https://github.com/GromNaN/Welldom","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GromNaN%2FWelldom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GromNaN%2FWelldom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GromNaN%2FWelldom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GromNaN%2FWelldom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GromNaN","download_url":"https://codeload.github.com/GromNaN/Welldom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250477829,"owners_count":21437049,"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":["xml","xml-document","xpath"],"created_at":"2024-10-02T12:26:41.806Z","updated_at":"2025-04-23T17:21:33.481Z","avatar_url":"https://github.com/GromNaN.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Welldom, the XML toolbox for PHP         [![Build Status](https://secure.travis-ci.org/LExpress/Welldom.png)](http://travis-ci.org/LExpress/Welldom)\r\n================================\r\n\r\n*Welldom* try to ease the use of DOM to manipulate XML documents with the following features :\r\n\r\n* Error management\r\n* Unique encoding for XML input/output\r\n* Simple methods to query and manipulate the DOM with Xpath\r\n* Batch on node list\r\n* Node rename \u0026 remove methods\r\n\r\nRequirements\r\n------------\r\n* PHP 5.3+\r\n* PHPUnit 5.6+\r\n\r\nInstallation\r\n------------\r\nThe library follow the PSR-0 naming convention. To load the library,\r\nuse any compliant class loader or simply require the `src/autoload.php` file.\r\n\r\n``` php\r\nrequire __DIR__ . '/path/to/expdom/src/autoload.php';\r\n```\r\n\r\nUsage\r\n-----\r\nLoad an XML document:\r\n\r\n``` php\r\n\u003c?php\r\n\r\nuse Welldom\\Document;\r\n\r\n$doc = new Document('UTF-8');\r\n\r\nif (false === $doc-\u003eload('data.xml')) {\r\n    $errors = $doc-\u003egetLastErrors();\r\n    throw new Exception(\"XML Loading error\\n\" . implode(\"\\n\", $errors));\r\n}\r\n\r\n// ... enjoy your DOM document\r\n```\r\n\r\nFind a node values using XPath:\r\n\r\n``` php\r\n$values = array(\r\n    'title' =\u003e $doc-\u003egetNodeValue('//book/title'),\r\n    'lang' =\u003e $doc-\u003egetNodeValue('//book/title/@lang', 'en'),\r\n);\r\n```\r\n\r\nExecute action on each node matching a given Xpath:\r\n\r\n``` php\r\n$doc-\u003equery('//foo/bar[@lang=de]')\r\n    -\u003eremove();\r\n\r\n$doc-\u003equery('//foo/bar[@lang=english]/@lang')\r\n    -\u003esetValue('en');\r\n```\r\n\r\nRun tests\r\n---------\r\nRun PHPUnit test suite:\r\n\r\n    phpunit\r\n\r\n\r\nLicense\r\n-------\r\nFor the full copyright and license information, please view the LICENSE file that was distributed with this source code.\r\n\r\nContributors:\r\n\r\n* [Jérôme Macias](/jeromemacias)\r\n* [Jérôme Tamarelle](/GromNaN)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgromnan%2Fwelldom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgromnan%2Fwelldom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgromnan%2Fwelldom/lists"}