|Re: XMLResource.OPTION_FORMATTED is not working [message #1398529 is a reply to message #1398513]
||Fri, 11 July 2014 07:42
| Ed Merks
Registered: July 2009
You've not said much about your model, but if the XSD involves complex
types with mixed content, EMF will print out exactly the white space
that appears in the feature maps corresponding to that mixed content.
Serializing will not alter the model itself to introduce formatting. In
other words, the formatting option only applies for instances of
EClasses for which
UNSPECIFIED_CONTENT or ELEMENT_ONLY_CONTENT, i.e., only for the cases
where just white space is allowed and that white space is not meaningful
nor recorded in the model upon deserialization.
On 11/07/2014 9:18 AM, Jon Buck wrote:
> Hi All, hopefully someone may have seen this before....
> I have created an ecore and genmodel from an XSD which is all fine
> however when I create a model and try to save it using the generated
> resource factory along with the (XMLResource.OPTION_FORMATTED,
> Boolean.TRUE) option I am getting a single line of text in the file...
> Any thoughts anyone?? What am I doing wrong??
Powered by FUDForum
. Page generated in 0.02324 seconds