kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.53k stars 81 forks source link

[xq] Parse optional schema (xsd) file to determine the types for better json output #155

Closed tempelmann closed 1 year ago

tempelmann commented 1 year ago

This is a feature review. When I parse an XML file, even when it points to a valid xsd file (online), there's no attempt to load it, nor do I see an option to supply one on the local file system.

It would be great if the xsd could be used to learn about the types of data, especially when they're a number or a boolean.

kislyuk commented 1 year ago

Thanks for your suggestion. I don't consider this feature to be in scope for xq - you may want to look at using other libraries like xmlschema in a script to accomplish this.