Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Create new DOM document from XSD schema
Create new DOM document from XSD schema [message #73760] Tue, 04 March 2008 14:51 Go to next message
Eclipse User
Originally posted by: mikrodj.hotmail.com

Hi everyone, I would like to know, How I can create a minimum XML document
from a XSD schema. I can't use JAXB because the schema is created during
the execution of my code.

Any idea?

Cheers, David.
Re: Create new DOM document from XSD schema [message #73776 is a reply to message #73760] Tue, 04 March 2008 15:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040404040703020905070800
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

David,

I think the WTP project has support for creating a sample instance from
a schema. The XSD project doesn't provide that directly. I've added
their newsgroup to the "to" list of the reply. EMF itself supports
dynamic XSD binding (no need for static code generation), but that won't
directly solve your problem:
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>

http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava


David wrote:
> Hi everyone, I would like to know, How I can create a minimum XML
> document from a XSD schema. I can't use JAXB because the schema is
> created during the execution of my code.
> Any idea?
>
> Cheers, David.
>
>


--------------040404040703020905070800
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
I think the WTP project has support for creating a sample instance from
a schema.
Re: Create new DOM document from XSD schema [message #73794 is a reply to message #73776] Tue, 04 March 2008 16:21 Go to previous messageGo to next message
Eclipse User
Originally posted by: dcarver.starstandard.org

Yes, you can use the tools in Web Standard Tools (no need to get the
full WTP unless you need it), to generate a sample XML Instance.

http://www.eclipse.org/webtools/community/tutorials/XMLWizar ds/XMLWizards.html

The above tutorial will walk you through the process. There is also API
that will allow you to do this as well.
Dave

Ed Merks wrote:
> David,
>
> I think the WTP project has support for creating a sample instance from
> a schema. The XSD project doesn't provide that directly. I've added
> their newsgroup to the "to" list of the reply. EMF itself supports
> dynamic XSD binding (no need for static code generation), but that won't
> directly solve your problem:
> < http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
>
> http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava
>
>
> David wrote:
>> Hi everyone, I would like to know, How I can create a minimum XML
>> document from a XSD schema. I can't use JAXB because the schema is
>> created during the execution of my code.
>> Any idea?
>>
>> Cheers, David.
>>
>>
>
Re: Create new DOM document from XSD schema [message #73863 is a reply to message #73794] Tue, 04 March 2008 20:19 Go to previous messageGo to next message
Eclipse User
Originally posted by: wuamy.ca.ibm.com

In addition to what Dave said, you can also rightclick the xsd file in the
project explorer/navigator and do Generate->XML File.. (it just invokes
the new xml wizard with some fields already filled in for you based on the
schema file selected)
Re: Create new DOM document from XSD schema [message #73935 is a reply to message #73863] Wed, 05 March 2008 11:11 Go to previous messageGo to next message
Eclipse User
Originally posted by: mikrodj.hotmail.com

Thank you for your answer. What I exact need is the same idea of the XML
Wizard but I have to do it with source code because I generated the schema
during the execution of my plugin and then I have to generate the XML from
the schema previously created.

Could you let me know what classes are involved in this process?

Anyway I'm going to download wtp project source code and I'll take a look
around new XML Wizard code.

Cheers, David.
Re: Create new DOM document from XSD schema [message #73953 is a reply to message #73935] Thu, 06 March 2008 00:51 Go to previous messageGo to next message
Eclipse User
Originally posted by: wuamy.ca.ibm.com

Try checking out the org.eclipse.wst.xml.ui plugin,
org.eclipse.wst.xml.ui.internal.wizards package, NewXMLWizard &
NewXMLGenerator class.
Re: Create new DOM document from XSD schema [message #493164 is a reply to message #73935] Fri, 23 October 2009 12:49 Go to previous message
jaalex  is currently offline jaalex
Messages: 2
Registered: October 2009
Junior Member
David,

Did you find a solution to this problem. I've the exact same situation and your inputs/direction would really help so i don't have to reinvent the wheel.

Thanks,
jaa
Re: Create new DOM document from XSD schema [message #602864 is a reply to message #73760] Tue, 04 March 2008 15:56 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040404040703020905070800
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

David,

I think the WTP project has support for creating a sample instance from
a schema. The XSD project doesn't provide that directly. I've added
their newsgroup to the "to" list of the reply. EMF itself supports
dynamic XSD binding (no need for static code generation), but that won't
directly solve your problem:
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>

http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava


David wrote:
> Hi everyone, I would like to know, How I can create a minimum XML
> document from a XSD schema. I can't use JAXB because the schema is
> created during the execution of my code.
> Any idea?
>
> Cheers, David.
>
>


--------------040404040703020905070800
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
I think the WTP project has support for creating a sample instance from
a schema.
Re: Create new DOM document from XSD schema [message #602869 is a reply to message #73776] Tue, 04 March 2008 16:21 Go to previous message
Eclipse User
Originally posted by: dcarver.starstandard.org

Yes, you can use the tools in Web Standard Tools (no need to get the
full WTP unless you need it), to generate a sample XML Instance.

http://www.eclipse.org/webtools/community/tutorials/XMLWizar ds/XMLWizards.html

The above tutorial will walk you through the process. There is also API
that will allow you to do this as well.
Dave

Ed Merks wrote:
> David,
>
> I think the WTP project has support for creating a sample instance from
> a schema. The XSD project doesn't provide that directly. I've added
> their newsgroup to the "to" list of the reply. EMF itself supports
> dynamic XSD binding (no need for static code generation), but that won't
> directly solve your problem:
> < http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
>
> http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava
>
>
> David wrote:
>> Hi everyone, I would like to know, How I can create a minimum XML
>> document from a XSD schema. I can't use JAXB because the schema is
>> created during the execution of my code.
>> Any idea?
>>
>> Cheers, David.
>>
>>
>
Re: Create new DOM document from XSD schema [message #602887 is a reply to message #73794] Tue, 04 March 2008 20:19 Go to previous message
Amy Wu is currently offline Amy Wu
Messages: 2
Registered: July 2009
Junior Member
In addition to what Dave said, you can also rightclick the xsd file in the
project explorer/navigator and do Generate->XML File.. (it just invokes
the new xml wizard with some fields already filled in for you based on the
schema file selected)
Re: Create new DOM document from XSD schema [message #602906 is a reply to message #73863] Wed, 05 March 2008 11:11 Go to previous message
David Gomez is currently offline David Gomez
Messages: 3
Registered: August 2010
Junior Member
Thank you for your answer. What I exact need is the same idea of the XML
Wizard but I have to do it with source code because I generated the schema
during the execution of my plugin and then I have to generate the XML from
the schema previously created.

Could you let me know what classes are involved in this process?

Anyway I'm going to download wtp project source code and I'll take a look
around new XML Wizard code.

Cheers, David.
Re: Create new DOM document from XSD schema [message #602910 is a reply to message #73935] Thu, 06 March 2008 00:51 Go to previous message
Amy Wu is currently offline Amy Wu
Messages: 2
Registered: July 2009
Junior Member
Try checking out the org.eclipse.wst.xml.ui plugin,
org.eclipse.wst.xml.ui.internal.wizards package, NewXMLWizard &
NewXMLGenerator class.
Re: Create new DOM document from XSD schema [message #604404 is a reply to message #73935] Fri, 23 October 2009 12:49 Go to previous message
jaalex  is currently offline jaalex
Messages: 2
Registered: October 2009
Junior Member
David,

Did you find a solution to this problem. I've the exact same situation and your inputs/direction would really help so i don't have to reinvent the wheel.

Thanks,
jaa
Previous Topic:Resolving XSD includes
Next Topic:[Announce] Eclipse/OMG Symposium 2010
Goto Forum:
  


Current Time: Thu Oct 23 19:21:42 GMT 2014

Powered by FUDForum. Page generated in 0.02039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software