Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Enhance XML parser/writer/traverser #1

Open
8 tasks
wooky opened this issue Oct 3, 2021 · 0 comments
Open
8 tasks

Enhance XML parser/writer/traverser #1

wooky opened this issue Oct 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@wooky
Copy link
Owner

wooky commented Oct 3, 2021

  • Rename __attributes__ and __item__ fields
    • For example, to @attributes@ and @item@
  • Improve error reporting
    • If an element is missing, the message Text element __item__ has no text has been previously reported, which is useless
    • In general, provide a wider range of errors, and convert XML errors to Zig ones, rather than returning a generic zupnp.xml.Error
  • Support more types
    • float, enum (both numeric and stringy), union, array, pointer (non-string, that's already dealt with)
  • Allow parsing without providing an allocator
    • With some exceptions, e.g. parsing into any slice that's not a string requires an allocator
  • Verify that the target struct doesn't have both @item@ and non-@attributes@ fields
  • Support parsing XML documents that do not have one root node
    • Currently the library crashes if a document like <tag1 /><tag2 /> is provided
  • Use default values if the parser doesn't find a tag in the document
  • Differentiate between missing tags and empty strings inside the parser
@wooky wooky added the enhancement New feature or request label Oct 3, 2021
@wooky wooky transferred this issue from wooky/zupnp Sep 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant