Q:

Getting text of org-mode elements using org-element-map

I'm attempting to write an elisp function(s) to extract text from org files. Specifically, I want to be able to convert the values in an org-table into a list of lists, so that I can populate org-feeds-alist at startup time from a file outside of my .emacs. 
My functions look like this:
(defun·org-config-parse-get-table-rows·(file)
"Return·table·rows·minus·header"
(with-temp-buffer
··(insert-file-contents·file)
··(cddr·(org-element-map·(org-element-parse-buffer)·'(table-row)·'identity))))

(defun·org-config-parse-get-table-cells·(file)
··(org-element-map·(org-config-parse-get-table-rows·file)·'(table-cell)·'identity))

I am testing it with the following table:
|·Name···········|·Fav·Color·|·Age·|·Sex····|
|----------------+-----------+-----+--------|
|·Jim············|·Blue······|··19·|·Male···|
|·Jane···········|·Green·····|··18·|·Female·|
|·Ort'hlrothl'gr·|·Unkown····|·-29·|·???····|

The closest I am able to get to retrieving the text of a single cell in the table is with the following:
(car·(last·(car·(org-config-parse-get-table-cells·"test.org"))))

which evaluates to:
#("Jim" 0 3 
  (:parent 
    ...

Given a list of org elements returned by org-element-parse-buffer, what is the proper way of extracting the text of those elements as a string?
Thanks in advance.

A:

As I understood, you want a list of lists from an org-mode table.
Here are the relevant bits of org-table-export:
(defun orgtbl->lists ()
  (unless (org-at-table-p) (user-error "No table at point"))
  (org-table-align)
  (let* ((beg (org-table-begin))
     (end (org-table-end))
     (txt (buffer-substring-no-properties beg end))
         (skip nil)
         (lines (nthcdr 0 (org-split-string txt "[ \t]*\n[ \t]*")))
         (lines (org-table-clean-before-export lines))
         (i0 (if org-table-clean-did-remove-column 2 1))
         (table (mapcar
                 (lambda (x)
                   (if (string-match org-table-hline-regexp x)
                       'hline
                     (org-remove-by-index
                      (org-split-string (org-trim x) "\\s-*|\\s-*")
                      nil i0)))
                 lines)))
    table))

You can look at the original function if something is still missing.

