Skip to content

Commit fddd893

Browse files
committed
Close #54
1 parent a84c462 commit fddd893

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

example1.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
--@author Manoel Campos da Silva Filho - http://manoelcampos.com
55

66
local xml2lua = require("xml2lua")
7+
print("xml2lua v" .. xml2lua._VERSION.."\n")
8+
79
--Uses a handler that converts the XML to a Lua table
810
local handler = require("xmlhandler.tree")
911

12+
1013
local xml = xml2lua.loadFile("people.xml")
1114

1215
--Instantiates the XML parser
@@ -33,4 +36,4 @@ for i, p in pairs(people) do
3336
end
3437

3538
--Recursivelly prints the table in an easy-to-ready format
36-
--xml2lua.printable(handler.root)
39+
--xml2lua.printable(handler.root)

example2.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
--@author Manoel Campos da Silva Filho - http://manoelcampos.com
55

66
local xml2lua = require("xml2lua")
7+
print("xml2lua v" .. xml2lua._VERSION.."\n")
78

89
--Uses a handler that converts the XML to a Lua table
910
local handler = require("xmlhandler.tree")

example3.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
--@author Manoel Campos da Silva Filho - http://manoelcampos.com
88

99
local xml2lua = require("xml2lua")
10+
print("xml2lua v" .. xml2lua._VERSION.."\n")
11+
1012
--Uses a handler that converts the XML to a Lua table
1113
local handler = require("xmlhandler.tree")
1214

example4-table2xml.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
--@author Manoel Campos da Silva Filho - http://manoelcampos.com
55

66
local xml2lua = require("xml2lua")
7+
print("xml2lua v" .. xml2lua._VERSION.."\n")
78

89
local people = {
910
person = {
@@ -18,4 +19,4 @@ xml2lua.printable(people)
1819
print("\n------------------------------------------------------\n")
1920

2021
print("XML Representation\n")
21-
print(xml2lua.toXml(people, "people"))
22+
print(xml2lua.toXml(people, "people"))

xml2lua-1.4-4.rockspec renamed to xml2lua-1.4-5.rockspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package = "xml2lua"
2-
version = "1.4-4"
2+
version = "1.4-5"
33
source = {
44
url = "git://github.com/manoelcampos/xml2lua",
5-
tag = "v1.4-4"
5+
tag = "v1.4-5"
66
}
77
description = {
88
summary = "An XML Parser written entirely in Lua that works for Lua 5.1+",

xml2lua.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
--
5050
--@author Paul Chakravarti (paulc@passtheaardvark.com)
5151
--@author Manoel Campos da Silva Filho
52-
local xml2lua = {}
52+
local xml2lua = {_VERSION = "1.4-5"}
5353
local XmlParser = require("XmlParser")
5454

5555
---Recursivelly prints a table in an easy-to-ready format

0 commit comments

Comments
 (0)