From Open Babel
Revision as of 16:57, 26 January 2006 by Ghutchis (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Filename Extensions xml
Chemical MIME Type Undefined
Specification URL Unknown
Import {{{import}}}
Export {{{export}}}
Open Babel Version {{{version}}}


 Calls a particular XML format depending on the XML namespace,
 or the default format (which is probably CML).
 This implementation uses libxml2.
 Read option, e.g. -an
 n  Read objects of first namespace only

Additional Comments

This is a general XML "format" which reads a generic XML file and infers its format from the namespace as given in a xmlns attribute on an element. If a namespace is recognised as associated with one of the XML formats in OpenBabel, and the type of the object (e.g. a molecule) is appropriate to the output format then this is used to input a single object. If no namespace declaration is found the default format (currently CML) is used.

The process is repeated for any subsequent input so that it is possible to input objects written in several different schemas from the same document. The file CMLandPubChem.xml illustrates this and contains molecules in both CML and PubChem formats.