XML to XSD

Hello ,What are the Different Parsers that support conversion of XML datato XSD format?and Among the parsers which one is More Efficient for use.Thanks in AdvanceGanga
[209 byte] By [GANGAa] at [2007-10-2 17:48:38]
# 1
What do you mean "convert XML Data to XSD format"? XSD is just a schema definition file used to validate XML.
JSforSuna at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hi,If you mean "how to generate a schema from an xml instance, please check the following link that details some products that does this". Look for something called 'Trang" which is free and does what you want.cheers,vidyut
vidyuta at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
oops. Here's the link. http://hacks.oreilly.com/pub/h/2106cheers,vidyut
vidyuta at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Hello,

Thanks vidyut for u r reply,

Yes I want "generate a schema from an xml instance" but not using any of the existing tools .I need to do it programatically using either Java or any other .

Can any one give me suggestion in what way I need to start for

generating schema .

Is there any parser for accomplishing the task.

Thanks in Advance,

Ganga

GANGAa at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
You could use any parser that tells you all the attributes and elements for the file. Deriving the datatypes is pure guesswork.More important questionWny do you need to do this?
darteda at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
It certainly won't be a easy task to do. If you just want the data structure in the XSD, it is easy, but you also want restrictions, that would be difficult task that might involve heavy pattern matching, guess work and fuzzy logic...
yue42a at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7

Hi,

That is the reason I asked you to scroll down to where 'trang' is described. If you visit trang's website you will see that trang has an api you can call from your java code that will do what you want. Even if there isn't you can see the batch file to find out which class is getting called and call it from your java code. Eitherway, you would need to add trang.jar to your classpath.

Hope this helps.

cheers,

vidyut

vidyuta at 2007-7-13 19:06:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...