Skip to content

Commit 70fd996

Browse files
committed
Closes #7
- Updates modules to support Lua 5.1 to 5.3. - General refactoring to make code clear, reduce long functions and improve documentation.
1 parent b535a15 commit 70fd996

14 files changed

+665
-545
lines changed

.gitignore

100644100755
File mode changed.

.travis.yml

100644100755
File mode changed.

LICENSE

100644100755
File mode changed.

README.md

100644100755
File mode changed.

XmlParser.lua

Lines changed: 411 additions & 0 deletions
Large diffs are not rendered by default.

_config.yml

100644100755
File mode changed.

example1.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
---Sample application to read a XML file and print it on the terminal.
44
--@author Manoel Campos da Silva Filho - http://manoelcampos.com
55

6-
require("xml2lua")
6+
local xml2lua = require("xml2lua")
77
--Uses a handler that converts the XML to a Lua table
88
local handler = require("xmlhandler.tree")
99

people.xml

100644100755
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<people>
33
<person type="P">
4+
<![CDATA[
5+
Just a CDATA tag that may contain anything, including XML code,
6+
such as <tag>message</tag>.
7+
Its content is extracted but not processed.
8+
]]>
9+
10+
<!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. -->
11+
412
<name>Manoel</name>
513
<city>Palmas-TO</city>
614
</person>

xml2lua-1.0-1.rockspec renamed to xml2lua-1.1-0.rockspec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
package = "xml2lua"
2-
version = "1.0-1"
2+
version = "1.1-0"
33
source = {
44
url = "git://github.com/manoelcampos/xml2lua",
5-
tag = "v1.0-1"
5+
tag = "v1.1-0"
66
}
77
description = {
88
summary = "An XML Parser written entirely in Lua 5.",
99
detailed = [[
1010
Enables parsing an XML file and converting it to a Lua table,
1111
which can be handled directly by your application.
12+
It supports Lua 5.1 to 5.3.
1213
]],
1314
homepage = "http://manoelcampos.github.io/xml2lua/",
1415
license = "MIT"
1516
}
1617
dependencies = {
17-
"lua >= 5.1, <= 5.2"
18+
"lua >= 5.1, <= 5.3"
1819
}
1920
build = {
2021
type = "builtin",

0 commit comments

Comments
 (0)