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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gertone (Geert Bormans)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??

Gertone (Geert Bormans)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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

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?
Gertone (Geert Bormans)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
Gertone (Geert Bormans)Information 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 :)
Gertone (Geert Bormans)Information ArchitectCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.