Thanks a lot Werner ....! 

You solved my problem to a great extent but still I am unable to export
the instance of Schema into a file....

What I did is:

XMLInstance2Schema xmlInstance = new XMLInstance2Schema();
Schema xsd = xmlInstance.createSchema(
"C:\\workspaces\\DTDParser\\src\\com\\sopra\\xmlrnd\\xml\\person.xml");

Now, I have an instance of XSD but don't know the way to export it to a
file (.xsd) :(

Thanks once again,
Mohit

-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 25, 2007 2:57 PM
To: [email protected]
Subject: Re: [castor-user] How to create XML Schema based on XML

Hi Mohit,

http://castor.codehaus.org/javadoc/org/exolab/castor/xml/schema/util/XML
Instance2Schema.html 
should have an initial pointer for what you are trying to do. If you've 
got additional questions, feel free to ask.

Werner

Mohit Singhal wrote:
> Hi Friends,
> 
>  
> 
> I need to *generate XML Schema (XSD) based on an XML* provided. Since,
I 
> read it in Castor's features ;
> 
>  
> 
> -
> 
>  
> 
>       
> 
> Ability to create an XML Schema from an XML input document
> 
> But I could not found anything in the documentation.
> 
>  
> 
> So, any help in this regard would be very grateful.
> 
>  
> 
> Thanks,
> 
> Mohit
> 
>  
> 
>  
> 
>
________________________________________________________________________
_________________________________________________________________
> This message may contain confidential and proprietary material for the

> sole use of the intended recipient. Any review or distribution by
others 
> is strictly prohibited.
> If you are not the intended recipient, please contact the sender and 
> delete all copies.
> P Before printing, think about the environment.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



_________________________________________________________________________________________________________________________________________
This message may contain confidential and proprietary material for the sole use 
of the intended recipient. 
Any review or distribution by others is strictly prohibited. If you are not the 
intended recipient, please contact the sender and delete all copies.
Before printing, think about the environment.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to