Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable TypeScript generators for specific xml parsers #50

Open
bastiion opened this issue Apr 27, 2022 · 0 comments
Open

configurable TypeScript generators for specific xml parsers #50

bastiion opened this issue Apr 27, 2022 · 0 comments

Comments

@bastiion
Copy link

Is your feature request related to a problem? Please describe.

Typescript generation come in very handy when zou try to deal with XML parsing within a typescript project. XML
Parsing is typically handled by a library, which then transforms the XML in a particular JSON-like form or gives accessor
functions to the data.
unfortunatelly xgen generated types cannot be used out of the box for most of the commonly used parsers, without modifying
the source of the xsd to typescript converter.

Describe the solution you'd like

Either separate flavours of the typescript parser could be provided or some configurability would be great in order to get type-definitions
for the JS-result of common XML-parser.

Additional context
For my use case, which was providing type-definitions for the gnucash XSD I was able to slightly modify the source code of the Typescript converter to get a fully typed view of a gnucash-xml, parsed by the fast-xml-parser . The result of the experiment can be seen here: https://github.com/bastiion/gnucash-xml-typescript-experiment/tree/gnucash/src/gnucash/typescript3
The modified branch of xgen can be found here https://github.com/bastiion/xgen/tree/faster-xml-parser-ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant