ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to get attribute value from xml tag?
@ 2019-10-20 14:05 Geert Verhaag
  2019-10-20 14:38 ` Thomas A. Schmitz
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Verhaag @ 2019-10-20 14:05 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 370 bytes --]

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

-- 



[-- Attachment #1.2: Type: text/html, Size: 1175 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-20 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20 14:05 How to get attribute value from xml tag? Geert Verhaag
2019-10-20 14:38 ` Thomas A. Schmitz
2019-10-20 17:13   ` Geert Verhaag

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).