func DocFromFile(filename string) *xmlx.Document { doc := xmlx.New() doc.LoadFile(filename, nil) return doc }
//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 }