Commit Graph

21 Commits

Author SHA1 Message Date
Jeroen van Rijn
062a3c2fae Fix parsing of CDATA tags (#5059)
Fixes #5054
2025-04-19 20:25:44 +02:00
Feoramund
1f04f541cf Fix -vet and -strict-style failures in tests 2024-08-26 16:20:08 -04:00
gingerBill
8642d719f0 Imply #no_capture to all variadic parameters 2024-07-14 12:19:47 +01:00
gingerBill
c7bd954752 Add more uses of #no_capture 2024-07-14 11:56:04 +01:00
Jeroen van Rijn
2fe961cbcd Fold XML attribute whitespace. 2024-06-12 13:30:00 +02:00
Jeroen van Rijn
ebadff555d Update XML reader to normalize whitespace, part 1. 2024-06-12 12:52:48 +02:00
Jeroen van Rijn
9d0f4833bf Port tests\core\encoding\xml
Made them run in parallel as well.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
4efef08c94 Update core:encoding to Unicode 15.1 table. 2024-01-02 18:03:32 +01:00
gingerBill
8aa36072fc Remove using where easily possible 2023-07-31 12:11:17 +01:00
Jeroen van Rijn
683ee75703 Fix #2684 2023-07-28 15:53:39 +02:00
gingerBill
ae9d540c1c Correct naming in tests 2022-07-11 11:55:49 +01:00
gingerBill
bc18310107 Correct xml test 2022-05-12 16:01:15 +01:00
Jeroen van Rijn
3978e7e1ca [xml] Add parse_from_string overload.
`parse` now takes either a `[]u8` slice or a string.
`load_from_file` takes a path string.
2022-04-30 14:43:58 +02:00
Jeroen van Rijn
957ef8e8fe [i18n/xml] Move I18N XML files to their own assets directory. 2022-04-29 13:16:30 +02:00
Jeroen van Rijn
127b0ba65e [xml] Enable tests. 2022-04-28 15:46:36 +02:00
Jeroen van Rijn
80878264b6 [xml] Speedup. 2022-04-28 15:29:00 +02:00
Jeroen van Rijn
7ec88d2430 [xml] Add option. 2021-12-05 21:06:33 +01:00
Jeroen van Rijn
d7200f6144 Improve tests in general.
Less spammy core tests: They don't print PASSes now, only logs and failures.

`core:image` and `core:encoding/xml` tests also find their assets relative to `ODIN_ROOT` now.
2021-12-05 02:53:09 +01:00
Jeroen van Rijn
d65d6edb0e [xml] Improve XML tests, test core:encoding/entity. 2021-12-05 02:52:23 +01:00
Jeroen van Rijn
5807214406 [xml] Improvements. 2021-12-05 02:52:23 +01:00
Jeroen van Rijn
b5c828fe4e [xml] Initial implementation of core:encoding/xml.
A from-scratch XML implementation, loosely modeled on the [spec](https://www.w3.org/TR/2006/REC-xml11-20060816).

Features:
		- Supports enough of the XML 1.0/1.1 spec to handle the 99.9% of XML documents in common current usage.
		- Simple to understand and use. Small.

Caveats:
		- We do NOT support HTML in this package, as that may or may not be valid XML.
		  If it works, great. If it doesn't, that's not considered a bug.

		- We do NOT support UTF-16. If you have a UTF-16 XML file, please convert it to UTF-8 first. Also, our condolences.
		- <[!ELEMENT and <[!ATTLIST are not supported, and will be either ignored or return an error depending on the parser options.

TODO:
- Optional CDATA unboxing.
- Optional `&gt;`, `&#32;`, `&#x20;` and other escape substitution in tag bodies.
- Test suite

MAYBE:
- XML writer?
- Serialize/deserialize Odin types?
2021-12-05 02:52:22 +01:00