Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND]Transform XML to TEXT
[XPAND]Transform XML to TEXT [message #895971] Mon, 16 July 2012 17:16 Go to next message
Yumin Zhou is currently offline Yumin Zhou
Messages: 21
Registered: July 2012
Junior Member
Hello,

I want to use xpand to transform .xml file to .txt file through EMF. I'm the very beginner with EMF and xpand. My xml file looks like <spirit:component>balabalabala</spirit:component>. Here I want to ask how to set the prefix "spirit" in the xpand template.

Best Regards
YM
Re: [XPAND]Transform XML to TEXT [message #896077 is a reply to message #895971] Tue, 17 July 2012 07:58 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten Thoms
Messages: 353
Registered: July 2009
Location: Dortmund
Senior Member

If XML is your input format you will need an XSD defining the structure of the XML. Then take the XSD Metamodel in your workflow configuration. See example projects here: http://git.eclipse.org/c/m2t/org.eclipse.xpand.git/tree/examples

Kind regards,
~Karsten


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: [XPAND]Transform XML to TEXT [message #896150 is a reply to message #896077] Tue, 17 July 2012 12:22 Go to previous message
Yumin Zhou is currently offline Yumin Zhou
Messages: 21
Registered: July 2012
Junior Member
Hello Karsten,

the project is based on the EMF. There are several XSD file transformed into EMF model. I finally got it. It doesn't matter whether there is prefix ahead of the real metadata or not. The path way is the same, e.x: component.design.interface. ... .
Thank You all the same.

BR
Yumin
Previous Topic:Retrieve target folder during generation
Next Topic:[Xpand] Running MWE workflow with Xpand generator outside eclipse?
Goto Forum:
  


Current Time: Wed Sep 17 11:34:24 GMT 2014

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

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