Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Getting XmlElement of an IModelElement
Getting XmlElement of an IModelElement [message #940570] Thu, 11 October 2012 19:19 Go to next message
Eyck Jentzsch is currently offline Eyck JentzschFriend
Messages: 16
Registered: August 2012
Junior Member
Hi,
is there a way to get the XmlElement of an IModelElement? I would like to implement a custom renderer for the XML sub-tree belonging to an IModelElement (in particular a render for MathML).
THXIA

-Eyck
Re: Getting XmlElement of an IModelElement [message #941577 is a reply to message #940570] Fri, 12 October 2012 17:07 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 952
Registered: July 2009
Senior Member
I think you would be better off implementing a Sapphire model for your MathML subtree and then implementing your custom presentation on top of a Sapphire model. That way, Sapphire would take care of XML binding, change notification and validation for you.

To access XmlElement from an IModelElement, do the following:

element.adapt( XmlResource.class ).getXmlElement()
Previous Topic:problem having namespace declaration within xml tree
Next Topic:Element ordering not according to XSD
Goto Forum:
  


Current Time: Fri Nov 28 05:51:16 GMT 2014

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

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