Skip to content

Migrate to quick_xml 0.42 #288

Description

@alexinsmail

In quick_xml 0.42, the API has been changed. Instead of Cow<'a,[u8]>, Cow<'a,&str> is used. When reading XML in encodings other than utf-8, the text is automatically converted to utf-8. No more need for complex workarounds to convert tag names, attribute values, and text.

Preferably, fix the search for base types. If the base type comes after the description of the child type, an error occurs. In the Java JAXB “xsd to java” implementation, there is no such error.
Preliminary analysis creates a description of the types. Currently, the generator processes this list sequentially and creates its own type lookup map. If the base type is at the end of a large xsd file, the generator hasn’t reached it yet and crashes during the analysis of the child type. Nothing prevents creating a type map before the analysis. Instead of one pass, there will be two passes, and there will be no errors.

Version 1.2
Improved Documentation Support XSD annotations (xs:documentation)

When generating code, there is a flow of thoughts without text formatting by lines. What type of comments is used in this generation style?

Version 1.3
Schema Modularization: Generated code can now be split into modules per schema definition.

In the configuration, you can configure the generation of modules based on the Map[key=namespace, value="model name"] principle. Another principle can be implemented: Map[key="xsd file name", value="model name"].
For each root element schema/complexType, create a *.rs file in the module directory and convert the schema/complexType@name to “snake case”. This will speed up the compilation of the source code.
Currently, all objects are in one file, and the size of the generated files is 3 MByte or more.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions