Just more this is how u do it...

java -cp
"C:/castor/castor-1.1.2.1-xml.jar;C:/castor/commons-logging.jar;C:/castor/xercesImpl.jar;C:/castor/xml-apis.jar;"
org.exolab.castor.xml.schema.util.XMLInstance2Schema
C:/castor/orderOriginal.xml > C:/castor/orderOriginal.xsd

thx
rajendra


Werner Guttmann wrote:
> 
> Hi,
> 
> taken from the main method of this class ....
> 
>      public static void main(String args[]) {
> 
>          if (args.length == 0) {
>              System.out.println("Missing filename");
>              System.out.println();
>              System.out.println("usage: java XMLInstance2Schema 
> <input-file> [<output-file> (optional)]");
>              return;
>          }
> I do acknowledge that this should and could be improved.
> 
> Werner
> 
> Mohit Singhal wrote:
>> 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
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-create-XML-Schema-based-on-XML-tf4688689.html#a13621381
Sent from the Castor - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email

Reply via email to