On 2/24/2016 3:32 PM, Thomas A. Schmitz wrote:
On 02/24/2016 03:15 PM, Hans Hagen wrote:

if you need more info i can add it ... one can then generate whatever
table one wants

elements in element .. one level i assume?

Yes, one level, otherwise things become too complex. And you're right,
it's already there in the "children" element. My question was not so
much about the information but about the visualization. Let's put it in
a slightly different way: the context parser holds the information about
my xml tree as a lua table, right? It would be handy to have a typeset
version of this table, as a, well, table, so we could see how to access
the different parts of it in lua and/or tex code. So I know that my
element is e, I know that it has a table e.at that collects the
different attributes in subtables of the form e.at["attribute"]. I
assume there's also e.text, e.first etc. Would it be possible to typeset
this information for elements.

no, there are no such fields

\starttext

\startluacode
    local t = xml.load("t:/sources/i-en-xml.xml")
    print(table.serialize(t,true,{})) -- you need to call this way
\stopluacode

\stoptext

at : attributes
ns : namespace
rn : remapped namespace
tg : tag (@..@ names indicate special tags)
dt : text

text is a table of strings and elements

(there are a few extra private fields and when applying searched there are index fields added)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to