XMLDecl(p, version$, encoding$, standalone)
version$ parameter
will be Nil for text declarations. The encoding$ parameter may be Nil for an XML declaration.
The standalone argument will contain -1, 0, or 1 indicating respectively that there was
no standalone parameter in the declaration, that it was given as no, or that it was given
as yes.
Function p_XMLDecl(p, version$, encoding$, standalone)
DebugPrint(version$, encoding$, standalone)
EndFunction
p = xml.CreateParser({XMLDecl = p_XMLDecl})
p:Parse([[<?xml version="1.0" encoding="ISO-8859-1"?><body/>]])
p:Free()
The code above will prints "1.0 ISO-8859-1 -1".