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

Please give an example on how to generate XML having complex XSD #26

Closed
TonyHenrique opened this issue Jun 29, 2018 · 4 comments
Closed

Comments

@TonyHenrique
Copy link

TonyHenrique commented Jun 29, 2018

I need to see an example of how to generate XML having this complex XSD (zipped file):

http://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=xLaRDcJryNA=

With that ZIP file contents, today in C# we can use

xsd.exe nfe_v4.00.xsd xmldsig-core-schema_v1.01.xsd /c /edb

Here in Brazil XSD Schemas are being used heavily.

Right now that governament portal indicates 19394 billion documents generated using those XSD schemas.

How to generate XML having those XSD, using F# ?

@giacomociti
Copy link
Collaborator

what root element are you trying to create?

@TonyHenrique
Copy link
Author

TonyHenrique commented Jun 30, 2018

The root element I want is this:
<xs:element name="NFe" type="TNFe">

In C# I used this:

var nfe = new TNFe();
nfe.infNFe.emit = new TNFeInfNFeEmit()
{
    xNome = "GR5"
};

there are even more complex constructs inside this, on the det and other elements and constraints.

@giacomociti
Copy link
Collaborator

Inside xmldsig-core-schema_v1.01.xsd the only element I see is Signature

@giacomociti
Copy link
Collaborator

I'm closing this because XSD is now available in F# Data and we may further discuss things there.

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

2 participants