Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Generating xml file from xml model from java code(Generating xml file from xml model from java code)
Generating xml file from xml model from java code [message #1852384] Fri, 13 May 2022 09:53 Go to next message
Евгений Семин is currently offline Евгений СеминFriend
Messages: 3
Registered: May 2022
Junior Member
Hi all! We have a Xml model like as:

<c:Object1>
<o:Entity Ref="o83"/>
</c:Object1>
<c:Object2>
<o:Entity Ref="o86"/>
</c:Object2>
</o:Relationship>
<o:Relationship Id="o82">
<a:ObjectID>1AE83BDD-EF53-4A5A-89CA-FF36F0633281</a:ObjectID>
<a:Name>OwnedObjOwnerUser</a:Name>
<a:Code>OwnedObjOwnerUser</a:Code>
<a:CreationDate>1645371388</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1645371747</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:DependentRole>A</a:DependentRole>
<a:Entity1ToEntity2RoleCardinality>1,1</a:Entity1ToEntity2RoleCardinality>
<a:Entity2ToEntity1RoleCardinality>0,n</a:Entity2ToEntity1RoleCardinality>
<c:Object1>
<o:Entity Ref="o88"/>
</c:Object1>


Can someone tell me how to convert the model from java code to a separate file (for example pom.xml), using epsilon tools from java code

I will be grateful for examples. thanks in advance
Re: Generating xml file from xml model from java code [message #1852439 is a reply to message #1852384] Mon, 16 May 2022 15:30 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hello,

If your XML document conforms to an XML schema, you could use the driver described in https://www.eclipse.org/epsilon/doc/articles/xsd-xml/. If it doesn't, then I'd suggest stripping the prefixes (i.e. "a:", "c:" etc.) and using the plain XML driver described in https://www.eclipse.org/epsilon/doc/articles/plain-xml/.

Best,
Dimitris
Re: Generating xml file from xml model from java code [message #1852441 is a reply to message #1852439] Mon, 16 May 2022 16:16 Go to previous messageGo to next message
Евгений Семин is currently offline Евгений СеминFriend
Messages: 3
Registered: May 2022
Junior Member
Thank you. How to use it from java code?
Re: Generating xml file from xml model from java code [message #1852442 is a reply to message #1852441] Mon, 16 May 2022 16:18 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

https://www.eclipse.org/epsilon/doc/articles/run-epsilon-from-java/ should help.

Best,
Dimitris
Re: Generating xml file from xml model from java code [message #1852443 is a reply to message #1852442] Mon, 16 May 2022 16:28 Go to previous messageGo to next message
Евгений Семин is currently offline Евгений СеминFriend
Messages: 3
Registered: May 2022
Junior Member
Thank you! But none of these examples create a new xml file from the xml model, only modify the existing one
Re: Generating xml file from xml model from java code [message #1852444 is a reply to message #1852443] Mon, 16 May 2022 16:36 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

I don't believe that we have an example that does exactly what you are looking for but if you could share your progress e.g. through a GitHub repo, I'd be happy to have a look and help when you get stuck.

Best,
Dimitris
Previous Topic:Eugenia: problem running example filesystem
Next Topic:Inheritance in ETL
Goto Forum:
  


Current Time: Fri Apr 26 08:49:55 GMT 2024

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

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

Back to the top