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

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
LVL 10
Who is Participating?
Geert BormansConnect With a Mentor Information ArchitectCommented:
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 (
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

Geert BormansConnect With a Mentor Information ArchitectCommented:
well, the IDE itself is taking away too much of your available memory.

I have used this before

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
aman0711Author Commented:
Hi Gertone,
                     I am very new to all this.... Is it real tough to use trang??

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

aman0711Author Commented:
Yes you are right,

cutting out the data from the file itself could help. I can delete the tags in XML spy right?
Geert BormansConnect With a Mentor Information ArchitectCommented:
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
Geert BormansInformation ArchitectCommented:
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
aman0711Author Commented:
Yeah, tried to open it with Spy.. till now working file.

I trimmed lot of lines till now..
aman0711Author Commented:
Thanks :)
Geert BormansInformation ArchitectCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.