func XMLBytesToGo(filename, pkgname string, b *[]byte) error {
	filename, err := checkFile(filename, pkgname)
	if err != nil {
		log.Fatal(err)
		return err
	}
	r := bytes.NewReader(*b)
	m, err := decodeXML(xml.NewDecoder(r), "", nil)
	if err != nil {
		log.Fatal(err)
		return err
	}
	nodes, err := leafNodes(m)
	if err != nil {
		log.Fatal(err)
		return err
	}
	strcts := leafNodesToStrcts("xml", nodes)
	return writeStruct(filename, pkgname, strcts)
}
XMLBytesToGo convert xml bytes to struct, then the struct will be writed to ./{pkg}/{filename}.go
package xj2go
import (
	"bytes"
	"encoding/xml"
	"log"
)
type XJ struct {
	Filepath string
	Pkgname string
	Rootname string
}
func New(filepath, pkgname, rootname string) *XJ {
	return &XJ{
		Filepath: filepath,
		Pkgname:  pkgname,
		Rootname: rootname,
	}
}
func (xj *XJ) XMLToGo() error {
	filename, err := checkFile(xj.Filepath, xj.Pkgname)
	if err != nil {
		log.Fatal(err)
		return err
	}
	nodes, err := xmlToLeafNodes(xj.Filepath)
	if err != nil {
		log.Fatal(err)
		return err
	}
	strcts := leafNodesToStrcts("xml", nodes)
	return writeStruct(filename, xj.Pkgname, strcts)
}