I have the following XML (given from an external source and cannot be changed):
<author ...>
<books>
<book ...>
...
</book>
</books>
</author>
And I want the EMF xcore model
class Author {
container Book[*] books;
}
class Book {
...
}
I have looked at ExtendedMetaData in EMF, but I cannot figure out the right combination of annotations that will give this mapping.
If we are just talking references (so books are not inlined in the author element but is referred to instead), then a combination of kind=element and name=book will do the job, but this doesn't quite work when the element is embedded as above.
No comments:
Post a Comment