Closed syvanpera closed 3 years ago
Is your feature request related to a problem? Please describe.
Looks like the generated types don't have any place for the actual text content of an element
Describe the solution you'd like
A field should be generated for the element text. For example xxxText where xxx is the element name.
xxxText
Additional context Here's an example xsd:
<?xml version="1.0" encoding="utf-8"?> <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:complexType name="SomeType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute ref="SomeTypeId" use="required" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:schema>
And the generated (TypeScript) types:
// Code generated by xgen. DO NOT EDIT. // SomeType ... export class SomeType { SomeTypeIdAttr: SomeTypeId; }
Maybe change to something like:
export class SomeType { SomeTypeIdAttr: SomeTypeId; SomeTypeText: string }
The xxxText might be too generic, but something like that
Ah this seems to be a duplicate for #7
Is your feature request related to a problem? Please describe.
Looks like the generated types don't have any place for the actual text content of an element
Describe the solution you'd like
A field should be generated for the element text. For example
xxxText
where xxx is the element name.Additional context Here's an example xsd:
And the generated (TypeScript) types:
Maybe change to something like:
The
xxxText
might be too generic, but something like that