Commits

Jason McKesson committed a09b422

Basic XML parsing test successful.

Comments (0)

Files changed (1)

+package.path = package.path .. ";./SLAXML/?.lua"
+local slaxml = require "slaxml"
+
+
+local glxmlstring
+do
+	local hFile = io.open('newglspecs/gl.xml')
+	assert(hFile, "Couldn't find file")
+	glxmlstring = hFile:read("*a")
+	hFile:close()
+end
+
+local parser = slaxml:parser{
+	startElement = function(name,nsURI) print(name) end,
+	attribute    = function(name,value,nsURI) end,
+	closeElement = function(name,nsURI)       end,
+	text         = function(text)             end,
+	comment      = function(content)          end,
+	pi           = function(target,content)   end,
+}
+
+parser:parse(glxmlstring, {stripWhitespace=false})