xpath

package
v0.0.0-...-8707e75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDoc

func GetDoc(r io.Reader) (*xmlpath.Node, error)

func GetValue

func GetValue(doc *xmlpath.Node, path string) (string, error)

Types

type Unmarshaler

type Unmarshaler struct {
	base.DataLoader
}

xml文档反序列化; 支持的注释格式包括: xm:"xpath://*[@id='content_right']/div/div[VarName[n:m]]/a[1]"; 其中下标n和m可以为空,缺省最小值为0,缺省最大值为999999 按变量定义顺序嵌套循环读取数据; 默认遇到空行退出循环 data数据类型支持:*Obj *[]Obj *[]*Obj;

func (*Unmarshaler) Unmarshal

func (m *Unmarshaler) Unmarshal(r io.Reader, data interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL