https://github.com/mrvladus/xml.h
Tiny header-only C/C++ XML parsing library
https://github.com/mrvladus/xml.h
c header-only library parsing xml
Last synced: 4 months ago
JSON representation
Tiny header-only C/C++ XML parsing library
- Host: GitHub
- URL: https://github.com/mrvladus/xml.h
- Owner: mrvladus
- License: mit
- Created: 2024-12-12T09:27:07.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-30T16:04:13.000Z (4 months ago)
- Last Synced: 2025-03-30T17:22:01.193Z (4 months ago)
- Topics: c, header-only, library, parsing, xml
- Language: C
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## xml.h - Header-only C/C++ library to parse XML.
Features:
- One tiny header file (~300 lines of code)
- Parses regular (`Tag Text`) and self-closing tags (``)
- Parses tags attributes (``)
- Ignores comments
- Very easy to use
- No bloat### Installation
It's one `xml.h` header file, you can put it directly in your project.
### Documentation
Look inside `xml.h` all functions have comments.
### Usage
It's very simple to use. Basically when you parse file with `xml_parse_file()` or string with `xml_parse_string()` you getting a root `XMLNode` which is gonna have children (sub-tags).
And you will be getting deeper into the tree of tags with `xml_node_child_at()` or by using loops.
See `test.xml` and `test.c` files for complete example.## Contributing
Pull requests are welcome!
Use `make build` or `make run` to test changes to this library.