https://github.com/dmccuskey/lua-e4x
Lightweight E4X XML processing in Lua
https://github.com/dmccuskey/lua-e4x
Last synced: over 1 year ago
JSON representation
Lightweight E4X XML processing in Lua
- Host: GitHub
- URL: https://github.com/dmccuskey/lua-e4x
- Owner: dmccuskey
- License: mit
- Created: 2014-12-16T20:26:43.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-10T15:10:37.000Z (about 11 years ago)
- Last Synced: 2025-05-07T13:58:01.607Z (over 1 year ago)
- Language: Lua
- Size: 293 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Overview ###
`lua_e4x` is an implementation of E4X for sane XML navigation in Lua. The API is modeled closely after the one for Adobe e4x (_see references_).
Requires: lua-error, lua-files, lua-objects, lua-utils (all included)
### Usage ###
**Searching via Dot Traversal**
```lua
xml.book -- searches all children of the XML root for `book` elements.
xml.book.title -- searches all children of each `book` result for `title` child-elements and returns those results, and so on.
xml.book[1].author -- only searches the first `book` element for any `author` child-elements.
```
### More Info ###
**Documentation**
http://docs.davidmccuskey.com/
**Examples**
There are a lot of examples found in the test dir. There is also a micro example on the documentation website.
**References**
* [Adobe e4x Docs](http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e72.html)