charto / cxml

Advanced schema-aware streaming XML parser
MIT License
45 stars 33 forks source link

Handling default attribute values #11

Open ariutta opened 7 years ago

ariutta commented 7 years ago

For XML with XSD-specified default values (like this), I'd like the option to tell cxml to fill in the defaults in the parsed JSON output. Right now, if the attribute is not specified in the XML, it won't appear in the JSON output, even if the XSD specifies a default value.

Any suggestions on where to refactor cxml (and maybe cxsd) to implement this?

jjrv commented 7 years ago

There's big changes coming to cget / cxml / cxsd and I see you've been working on adding xpath support, which is very useful for the future. Maybe it we could collaborate in Gitter? I set up a room https://gitter.im/charto/cxml for this project.