Hi Mark, On Thu, Oct 8, 2009 at 2:14 PM, Mark Rijnbeek <ma...@ebi.ac.uk> wrote: > I was testing Save As.. with Jchempaint, saving a structure as CML. > The editor produces a file, see attached called "no.cml". > If I try to open that one in Marvin, I get an error. It expects <cml> as a > root tag. > > When I edit the file to be enclosed with <cml>..</cml> (see "yes.cml", > attached) then it opens up in Marvin all right. > > Should the CDK CML writer use these root tags or should Marvin not complain?
Marvin in Wrong (tm)... The use of <cml> is not mandated by the CML specs. However, there is nothing against having the JChemPaint applet wrap the CML in an extra CMLElement, just to be compatible with Marvin... The CMLWriter is merely wrapping the cdk.libiocml.Convertor functionality, and a bit of code copy/paste and adding the CMLElement should do the trick. Alternatively, you could write a patch for an IO setting wrapInCMLElement that does the job on a CMLWriter level... Egon -- Post-doc @ Uppsala University Homepage: http://egonw.github.com/ Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user