Open Smotrov opened 2 years ago
Hi,
Here's an example on generating rust code form xsd file.
mkdir data_models
cd data_models
wget https://raw.githubusercontent.com/BroadbandForum/cwmp-data-models/master/cwmp-1-0.xsd -O cwmp-1-0.xsd
cd ..
mkdir gen_code
# clone the repo
cd xsd-parser-rs
cargo build
./target/debug/xsd-parser -i ../data_models/cwmp-1-0.xsd -o ../gen_code/cwmp_1_0.rs
use
statements at top of generated rust code xsd-types
sub project in the repo has types used in the generated rust code. Your code should include xsd-types
Would be great to get that in the readme
It would be really appreciated if you'll share some examples how it is actually possible to to generate RUST code using your parser. How to convert an XSD file to rust struct? Digging through source code but with no luck yet.