Пример #1
0
func DocFromFile(filename string) *xmlx.Document {
	doc := xmlx.New()
	doc.LoadFile(filename, nil)

	return doc
}
Пример #2
0
//xmlx has some nice load functions. I wrap a few of them here.
//refer to xmlx source to see more of them.
func DocFromStream(r io.Reader) *xmlx.Document {
	doc := xmlx.New()
	doc.LoadStream(r, nil)

	return doc
}