#+Title: different elements of a table for export and tangle
The results of this code block will be exported. Notice that the
second line is removed.
#+begin_src emacs-lisp :var table=raw :exports results
(mapcar
(lambda (row)
(if (equal row 'hline) ;; <- special handling for 'hline
row
(list (nth 0 row) (nth 2 row))))
table)
#+end_src
* COMMENT raw table data and tangle command
** data
#+name: raw
| both | tangle | export |
|-------+---------+---------|
| both1 | tangle1 | export1 |
| both2 | tangle2 | export2 |
| both3 | tangle3 | export3 |
** tangle
Convert the elisp table to xml.
#+name: raw-to-xml
#+begin_src emacs-lisp :var table=raw :colnames no
(mapconcat (lambda (row)
(format "%S%S"
(nth 0 row) (nth 1 row)))
(car (org-babel-get-colnames table)) "\n")
#+end_src
Tangle to xml.
#+begin_src xml :tangle something.xml :noweb yes :padline no
<>
#+end_src