[NTG-context] How to get attribute value from xml tag?

Geert Verhaag verhaaggchm at ziggo.nl
Sun Oct 20 16:05:06 CEST 2019


Hi,

Struggling with XML in ConTeXt.

I'have the following tag in my xml file:

...
<invoice>
   <travel>
     <distance unit="km">20</distance>
   </travel>
...
</invoice>

\startxmlsetups xml:invoice:travel
   \xmlfirst{#1}{distance}
\stopxmlsetups

The \xmlfirst{#1}{distance} yields /20/, but how can the unit attribute 
value /km/ be accessed?

Gerard

-- 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20191020/128097e4/attachment.html>


More information about the ntg-context mailing list