lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Aidar

> Does anybody use luasoap?
> In their examples here https://tomasguisasola.github.io/luasoap/examples.html they are addressing to elements by index, for example ent[1][1][1]. Is it possible to address by tag?
You have to convert the structure (which comes from LuaExpat's LOM) or
implement a search function.  There are many ways to do it, depending
on your case.  For example, sometimes you are dealing with some kind
of structure such as a tree, then it seems reasonable to produce a
table with string entries for each tag.  But sometimes you have a
sequence of equal tags; then you'd prefer some form of an array.  I
have a suite of functions that combine all of these in a general form.
If you are interested, I can pack it and share...

Regards,
Tomás