Commit 370932e
authored
feat: add XML format support (read/write) (#54)
Adds XML as a fully supported format alongside JSON, YAML, TOML, and CSV.
- Parser: elements → maps, repeated elements → arrays, attributes with
configurable prefix (@), CDATA, mixed content (#text), namespaces
- Writer: maps → elements, arrays → repeated tags, @-prefixed keys →
attributes, XML declaration, special-character escaping
- Configurable attribute prefix and root element name via XmlConfig
- Comprehensive tests: parsing, serialization, round-trips, edge cases
- CLI integration: -f xml / -t xml, auto-detect from .xml extension
Fixes #251 parent 13e7bd7 commit 370932e
File tree
5 files changed
+898
-2
lines changed- src
- formats
- tests
5 files changed
+898
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
| 192 | + | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
| |||
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
| 213 | + | |
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
| |||
353 | 360 | | |
354 | 361 | | |
355 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
356 | 368 | | |
357 | 369 | | |
358 | 370 | | |
| |||
375 | 387 | | |
376 | 388 | | |
377 | 389 | | |
378 | | - | |
| 390 | + | |
| 391 | + | |
379 | 392 | | |
380 | 393 | | |
381 | 394 | | |
| |||
488 | 501 | | |
489 | 502 | | |
490 | 503 | | |
| 504 | + | |
491 | 505 | | |
492 | 506 | | |
493 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
0 commit comments