Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

gluaxmlpath

gluaxmlpath provides an easy way to use xmlpath from within GopherLua.

Installation

go get github.com/ailncode/gluaxmlpath

Usage

package main
import (
"github.com/ailncode/gluaxmlpath""github.com/yuin/gopher-lua"
)
funcmain() {
L:=lua.NewState()
deferL.Close()
gluaxmlpath.Preload(L)
iferr:=L.DoString(` xml ="<bookist><book>x1</book><book>x2</book><book>x3</book></booklist>" local xmlpath = require("xmlpath") node,err = xmlpath.loadxml(xml) path,err = xmlpath.compile("//book") it = path:iter(node) for k,v in pairs(it) do print(k,v:string()) end `); err!=nil {
panic(err)
}
}

About

gluaxmlpath: an xmlpath module for gopher-lua

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages