Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » Create new DOM document from XSD schema
Create new DOM document from XSD schema [message #73760] Tue, 04 March 2008 09:51 Go to next message
Eclipse UserFriend
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 10:56 Go to previous messageGo to next message
Eclipse UserFriend
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 11:21 Go to previous messageGo to next message
Eclipse UserFriend
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 15:19 Go to previous messageGo to next message
Eclipse UserFriend
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 06:11 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 05 March 2008 19:51 Go to previous messageGo to next message
Eclipse UserFriend
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 08:49 Go to previous message
Eclipse UserFriend
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 10:56 Go to previous message
Eclipse UserFriend
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 11:21 Go to previous message
Eclipse UserFriend
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 15:19 Go to previous message
Eclipse UserFriend
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 06:11 Go to previous message
Eclipse UserFriend
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] Wed, 05 March 2008 19:51 Go to previous message
Eclipse UserFriend
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 08:49 Go to previous message
Eclipse UserFriend
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: Mon May 05 09:28:32 EDT 2025

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

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

Back to the top