Tool to validate and generate DTD, Schema from a XML document large in size

aman0711
aman0711 used Ask the Experts™
on
HI experts,
                  I am looking for a tool that could generate DTD and schema from an XMl document, right now I am using XMLspy but its running out of memory as soon as I try to generate XML schema or DTD.

                  The XML file size I am dealing with is aroung 160mb
     
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gertone (Geert Bormans)Information Architect
Top Expert 2006
Commented:
well, the IDE itself is taking away too much of your available memory.

I have used this before
http://www.thaiopensource.com/relaxng/trang.html

I have not tested that on such large files, but it has no problem with things in the 40MB range, that I know
Maybe if you give it enough heapspace...

On the other hand, if you have a 160MB file, I bet there is a lot of repetition in there,
try cutting it, it will likely not have an effect on the schema if you derive a schema from a subset of the file

Author

Commented:
Hi Gertone,
                     I am very new to all this.... Is it real tough to use trang??

                     
Information Architect
Top Expert 2006
Commented:
no, it is easy

make sure you have a java virtual machine and then you can do...
java -jar trang.jar args

it is all in the manual

I mainly use Trang inside an IDE (www.oxygenxml.com)
That is even easier, but it will give you the same memory problems.
That is why I suggest using the command line version of it

What is not in the manual is increasing the heapspace
java -Xms1024M -Xmx1024M  -jar trang.jar args

Make sure you have at least a gigabyte free for this in RAM

But seriously...
cut the file in pieces, make a schema for each piece and compare
it will be a lot better



Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Author

Commented:
Yes you are right,

cutting out the data from the file itself could help. I can delete the tags in XML spy right?
Gertone (Geert Bormans)Information Architect
Top Expert 2006
Commented:
you can, allthough 160MB is a bit hard for SPY to edit...
you can try, if it kills Spy, use a text editor for large files
Gertone (Geert Bormans)Information Architect
Top Expert 2006

Commented:
160MB files very often are dumps from a database, If you have two rows instead of a million rows, you would still generate the same schema

Author

Commented:
Yeah, tried to open it with Spy.. till now working file.

I trimmed lot of lines till now..

Author

Commented:
Thanks :)
Gertone (Geert Bormans)Information Architect
Top Expert 2006

Commented:
welcome

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial