You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Shah Asrani <sh...@gmail.com> on 2008/12/08 21:48:17 UTC

api to generate sample xml

Is there any api call in xerces that can be used to create a sample
xml file for given xsd file?

Shah

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: api to generate sample xml

Posted by Shah Asrani <sh...@gmail.com>.
Hi Jacob and Michael,
Thanks for quick responses.  I will look into both the links provided.
The exact scenario for my application is not fully known yet.  The
idea is to map elements in a schema file to some java objects. and
when java objects are initiallized, there is a need to convert the
java objects into xml that is valid as per schema that was mapped.  If
this can be done without generating a sample xml file, that is even
better.  Please don't hesitate to provide any info that might be
useful.


Best Regards,

Shah Asrani

On Mon, Dec 8, 2008 at 3:48 PM, Shah Asrani <sh...@gmail.com> wrote:
> Is there any api call in xerces that can be used to create a sample
> xml file for given xsd file?
>
> Shah
>

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: api to generate sample xml

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
The answer to Shah's question is no. Xerces has no such API however I don't
think JAXB is what Shah is looking for either. It won't generate sample
instance documents for you. I think there's a generator somewhere in
Eclipse WTP [1] though I've never looked at it. Probably other tools out
there.

[1] http://www.eclipse.org/projects/project_summary.php?projectid=webtools

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Jacob Kjome <ho...@visi.com> wrote on 12/09/2008 12:01:25 AM:

> You should look at JAXB2 for mapping schemas to XML.
>
> https://jaxb.dev.java.net/
>
>
> Jake
>
> On 12/8/2008 2:48 PM, Shah Asrani wrote:
> > Is there any api call in xerces that can be used to create a sample
> > xml file for given xsd file?
> >
> > Shah
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Re: api to generate sample xml

Posted by Jacob Kjome <ho...@visi.com>.
You should look at JAXB2 for mapping schemas to XML.

https://jaxb.dev.java.net/


Jake

On 12/8/2008 2:48 PM, Shah Asrani wrote:
> Is there any api call in xerces that can be used to create a sample
> xml file for given xsd file?
> 
> Shah
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org