From: Ola S. <ola...@fa...> - 2008-07-31 08:05:17
|
Hi, Thanks for your help. Another question below: On Jul 30, 2008, at 10:15 , Ola Spjuth wrote: > Hi, > > In Bioclipse (http://www.bioclipse.net) we need a fast way of > inspecting a file and find out if it contains 2D or 3D coordinates, > hence no parsing but only looking at a few early elements. The > method does not have to be foolproof, but must be fast. > > What are the ways of deducing if the file contains a molecule with > 2D or 3D? We only care about files with 1-N molecules currently, no > mixed content (like spectra as well in same file). > > I assume the top element is <molecule> with namespace=http:// > www.xml-cml.org/schema. I just stumbled upon a molecule with the namespace xmlns="http:// www.xml-cml.org/schema/cml2/core" A new acquaintance for me. Is this accepted? Are there any more namespaces I should let slip through my namespace filter (for backwards and future compatibility)? When filtering in Bioclipse/Eclipse it is common to read the root element but I assume it is not feasible in this case to filter based on root element name, and instead stick to root element namespace? Cheers, /Ola |