{"id":38661319,"url":"https://github.com/miute/pugixml-python","last_synced_at":"2026-01-17T09:39:24.592Z","repository":{"id":37939977,"uuid":"495884350","full_name":"miute/pugixml-python","owner":"miute","description":"Python bindings for pugixml","archived":false,"fork":false,"pushed_at":"2026-01-01T22:36:35.000Z","size":1121,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T09:37:28.758Z","etag":null,"topics":["dom","python","xml","xml-parser","xpath"],"latest_commit_sha":null,"homepage":"https://miute.github.io/pugixml-python/","language":"C++","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/miute.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-24T15:33:42.000Z","updated_at":"2026-01-01T22:36:33.000Z","dependencies_parsed_at":"2023-10-17T04:25:55.679Z","dependency_job_id":"eaf0328b-6ffe-42f0-a8ac-7aaf3c95aff1","html_url":"https://github.com/miute/pugixml-python","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/miute/pugixml-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miute%2Fpugixml-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miute%2Fpugixml-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miute%2Fpugixml-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miute%2Fpugixml-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miute","download_url":"https://codeload.github.com/miute/pugixml-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miute%2Fpugixml-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"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":["dom","python","xml","xml-parser","xpath"],"created_at":"2026-01-17T09:39:20.164Z","updated_at":"2026-01-17T09:39:22.729Z","avatar_url":"https://github.com/miute.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python bindings for pugixml\n\n[![PyPI](https://img.shields.io/pypi/v/pugixml)](https://pypi.org/project/pugixml/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pugixml)](https://pypi.org/project/pugixml/)\n[![PyPI - License](https://img.shields.io/pypi/l/pugixml)](https://pypi.org/project/pugixml/)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/miute/pugixml-python/main.svg)](https://results.pre-commit.ci/latest/github/miute/pugixml-python/main)\n[![tests](https://github.com/miute/pugixml-python/actions/workflows/tests.yml/badge.svg)](https://github.com/miute/pugixml-python/actions/workflows/tests.yml)\n[![build](https://github.com/miute/pugixml-python/actions/workflows/build.yml/badge.svg)](https://github.com/miute/pugixml-python/actions/workflows/build.yml)\n\n[pugixml](http://pugixml.org/) is a light-weight C++ XML processing library. It features:\n\n- DOM-like interface with rich traversal/modification capabilities\n- [Extremely fast](https://pugixml.org/benchmark.html) non-validating XML parser which constructs the DOM tree from an XML file/buffer\n- XPath 1.0 implementation for complex data-driven tree queries\n- Full Unicode support with Unicode interface variants and automatic encoding conversions\n\n## Documentation\n\n- pugixml-python\n  - [API Reference](https://miute.github.io/pugixml-python/)\n- pugixml\n  - [Quick-start guide](https://pugixml.org/docs/quickstart.html)\n  - [Reference manual](https://pugixml.org/docs/manual.html)\n\n## Example\n\nLoading XML document from file:\n\n```python\nfrom pugixml import pugi\ndoc = pugi.XMLDocument()\nresult = doc.load_file('xgconsole.xml')\nif not result:\n    print('parse error: status=%r description=%r' % (result.status, result.description()))\n```\n\nSearching for nodes/attributes with predicates:\n\n```python\ntools = doc.child('Profile').child('Tools')\n\n# Find child via predicate (looks for direct children only)\nnode = tools.find_child(lambda x: x.attribute('AllowRemote').as_bool())\nprint(node.attribute('Filename').value())\n\n# Find node via predicate (looks for all descendants in depth-first order)\nnode = doc.find_node(lambda x: x.attribute('AllowRemote').as_bool())\nprint(node.attribute('Filename').value())\n\n# Find attribute via predicate\nattr = tools.last_child().find_attribute(lambda x: x.name() == 'AllowRemote')\nprint(attr.value())\n```\n\nSelecting nodes via XPath expression:\n\n```python\ntools = doc.select_nodes('/Profile/Tools/Tool[@AllowRemote=\"true\" and @DeriveCaptionFrom=\"lastparam\"]')\nfor tool in tools:\n    print(tool.node().attribute('Filename').value())\n```\n\nUsing query objects and variables:\n\n```python\nvarset = pugi.XPathVariableSet()\nvar = varset.add('remote', pugi.XPATH_TYPE_BOOLEAN)\nquery_remote_tools = pugi.XPathQuery('/Profile/Tools/Tool[@AllowRemote = string($remote)]', varset)\n\nvar.set(True)\ntools_remote = query_remote_tools.evaluate_node_set(doc)\nfor tool in tools_remote:\n    tool.node().print(pugi.PrintWriter())\n\nvar.set(False)\ntools_local = query_remote_tools.evaluate_node_set(doc)\nfor tool in tools_local:\n    tool.node().print(pugi.PrintWriter())\n```\n\n## Installation\n\n### Installing a package from PyPI\n\n```bash\npip install pugixml\n```\n\n### Building a package from source\n\n- Requirements:\n  - C++17 compatible compiler (see [supported compilers](https://github.com/pybind/pybind11#supported-compilers))\n  - [CMake](https://cmake.org/) ≥ 3.15\n\n- Installing a package from PyPI:\n\n  ```bash\n  pip install --no-binary=:all: pugixml\n  ```\n\n- Installing the development version from the git repository:\n\n  ```bash\n  pip install git+https://github.com/miute/pugixml-python.git\n  ```\n\n## License\n\n- **pugixml-python** is licensed under the [MIT License](https://github.com/miute/pugixml-python/blob/main/LICENSE).\n- **pugixml** is licensed under the [MIT License](https://github.com/zeux/pugixml/blob/master/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiute%2Fpugixml-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiute%2Fpugixml-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiute%2Fpugixml-python/lists"}