[NTG-context] accessing xml element attributes in lua, how, if you do not want to use the .at scheme?
Gerben Wierda
gerben.wierda at rna.nl
Tue Jun 9 15:31:54 CEST 2020
I’ve been trying to find out how I can access XML node properties/attributes in lua other than via the .at syntactic scheme but using the property/attribute name as a string.
E.g., currently I do:
someVar = someNode.at.someProperty
but I would like to do something like
someVar = someNode[“someProperty”] or someNode.attribute(“someProperty”) or something where I can use the string version of the properties/attribute name.
It’s probably possible (after all these are all dynamic structures that come from data), but how exactly?
Thanks,
G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200609/9055a101/attachment.htm>
More information about the ntg-context
mailing list