StartElement(p, name$, attrs)
name$
. The attrs
parameter is a table with all the element attribute
names and values. The table contains an entry for every attribute in the element start tag.
The attribute's name is used as the table index.
Function p_StartElement(p, name$, attrs) DebugPrint("Open:", name$, attrs.name, attrs.author) EndFunction Function p_EndElement(p, name$) DebugPrint("Close:", name$) EndFunction p = xml.CreateParser({StartElement = p_StartElement, EndElement = p_EndElement}) p:Parse([[<plugin name="XML" author="Andreas Falkenhahn"/>]]) p:Free()The code above will print "Open: plugin XML Andreas Falkenhahn" and then "Close: plugin".