Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Re: Create new DOM document from XSD schema
Re: Create new DOM document from XSD schema [message #209466] Tue, 04 March 2008 15:56 Go 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 #209475 is a reply to message #209466] Tue, 04 March 2008 16: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 #209546 is a reply to message #209475] Tue, 04 March 2008 20: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 #209615 is a reply to message #209546] Wed, 05 March 2008 11: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 #209718 is a reply to message #209615] Thu, 06 March 2008 00:51 Go to previous 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.
Previous Topic:Page Rendering Puzzle
Next Topic:WTP: Populating WebService Explorer externally while WSDL Publish...
Goto Forum:
  


Current Time: Fri Apr 19 21:45:24 GMT 2024

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

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

Back to the top