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
aman0711Asked:
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 (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



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

                     
0
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?
0
 
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
0
 
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
0
 
aman0711Author Commented:
Yeah, tried to open it with Spy.. till now working file.

I trimmed lot of lines till now..
0
 
aman0711Author Commented:
Thanks :)
0
 
Geert BormansInformation ArchitectCommented:
welcome
0
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.