XML:getAttributes([path])

Return the value of all attributes of an element as a table. If no path is specified getAttributes returns the attributes of the current element.

Example

doc = XML.parse([[<config><options type="test"/></config>]])
attributes = doc:getAttributes('/config/options')
if attributes.type != 'test' then 
    error("Invalid result!",0) 
end