From ecore - to xsd [message #38065] |
Mon, 04 September 2006 06:57  |
Eclipse User |
|
|
|
Originally posted by: peter.kovgan.gmail.com
Is there approach(tool) to transfer ecore model to XSD schema?
Thanks!
|
|
|
|
|
Re: From ecore - to xsd [message #38682 is a reply to message #38465] |
Mon, 04 September 2006 11:32   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------090201050001090707060601
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Peter,
Use the popup menu in the Generator to generate the Test code and then
look at the XyzExample.java in the generated *.tests plugin. That
illustrates how to load and save instances in a standalone application.
If you move schemas around, you'll need to look at the schemaLocation
in each import to be sure it's correct relative to where you've put the
documents. You might find this article useful:
Binding XML to Java
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
Peter Kovgan wrote:
> Ed,
> thanks, I found it already.
> But could I ask other question:
>
> My model instance(output xml instance, created as result of diagram
> building)is created, but how can I use this XML in my application if,
> for example, I want to parse this XML?
>
> Example:
> I failed to parse it(at least in separated standalone app), because if
> I try to attach mymodel.XSD to this xml instance and ecore.XSD to
> mymodel.XSD then I receive error:
> "org.xml.sax.SAXParseException: Content is not allowed in prolog."
>
> This is references line:
> ecore.XSD<-mymodel.XSD<-myInstance.xml
>
>
> XML Spy signalizes about some very strange error in ecore.XSD.
> (I took ecore.XSD from jar and put it in some local folder).
>
> What is wrong?
> Probably I can't use this result XML instance out of plugin?
> How to use it(parse it) in plugin or out of plugin?
>
>
>
>
> Thanks!!
>
>
>
--------------090201050001090707060601
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">
Peter,<br>
<br>
Use the popup menu in the Generator to generate the Test code and then
look at the XyzExample.java in the generated *.tests plugin.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04056 seconds