How to use LuaExpat lom.parse

I am trying to use the LuaExpat lom.parse function. When the lxp.lom.parse statement is executed, the following error is recorded in the log:

                                      attempt to index field 'lom' (a nil value) 

Code

local lxp = require("lxp")
io.input(filename)
xmlstring = io.read("*all")         -- read the whole file
phantomstable = lxp.lom.parse(xmlstring)

The docs seem to gloss over the necessary require statement. Perhaps you have to require lom.lua explicitly. It’s in a subdirectory on Vera (/usr/lib/lua/lxp/lom.lua) which might not be in the lua path. Experiment with it till you get it to work. You may want to experiment on a Lua installation on a Real Computer instead.

This works :

lom = require("lxp.lom")

xmltable = lom.parse(xmlstring)