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??

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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:
All Courses

From novice to tech pro — start learning today.