I notice the experimental org-export.el contains an internal representation. It would probably be very easy for your python to parse the lisp s-expression it uses, if it were exported.

On Aug 6, 2009 3:55 PM, "Ilya Shlyakhter" <ilya_shl@alum.mit.edu> wrote:

I'm not an emacs-lisp programmer, but I'd like to write scripts
(ideally in Python) to generate custom reports from my .org files.
What would help a lot, is if there was a command to export an .org
file to a "native" XML format that would mirror the org file's
structure and all its logical elements (tags, properties, drawers,
dates etc).   I know about the DocBook exporter, but it maps orgmode's
concepts onto DocBook concepts such as articles.   I'm a longtime
orgmode user and it would be much simpler to write a program in terms
of the familiar org concepts (hierarchical entries, tags, properties
etc).
It would also be great if there was a way to import such an XML file
back into org.  Then one could e.g. take Toodledo.com tasks and
transform them into an orgmode file.

There is an orgmode Python reader at
http://www.members.optusnet.com.au/~charles57/GTD/orgnode.html
and I plan to use that for now.  But it doesn't support all orgmode
features, and more importantly it does its own parsing of orgfiles (so
may not keep up with any future changes).   Using orgmode's own
parser, and then exporting the results as XML, would be much more
reliable.

ilya


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode