cs0815
cs0815

Reputation: 17418

XSD problem - trying to generate xsd from xml

I am trying to generate a schema from this xml file:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=xml&retmode=xml&db=nucleotide&id=AB573763

I store it as s.xml and then tried:

xsd s.xml

It just does not finish it - seems to be stuck in an endless loop or something. What other options do I have to generate the xsd or can you see something wrong?

Thanks.

Christian

Upvotes: 1

Views: 565

Answers (2)

bruno777
bruno777

Reputation: 1896

On the fly, this site do the job :

http://www.freeformatter.com/xsd-generator.html

Upvotes: 1

Nic Gibson
Nic Gibson

Reputation: 7143

A schema generated from a single instance document is never going to be as high quality as one created from a schema as you can be almost certain that the generated schema will have distinct limitations.

I would suggest that you download the schema from the NIH (http://www.ncbi.nlm.nih.gov/dtd/NCBI_Seqset.dtd as @Tuomas Hietanen showed) and use a tool such as James Clark's Trang to generate a schema. Your resulting schema is likely to be of higher quality. If you have a copy of Oxygen you can simply use that as Trang is built-in.

Upvotes: 1

Related Questions