This repository contains a golang module for parsing hexis beatmap xml (hbxml) files.
To install the library, use go get
:
go get github.com/hexis-revival/hbxml
package main
import (
"os"
"github.com/hexis-revival/hbxml"
)
func main() {
file, err := os.Open("examples/Max Coveri - Running in the '90s (Francesco149) [Pro].hbxml")
if err != nil {
panic(err)
}
defer file.Close()
beatmap, err := hbxml.NewBeatmap(file)
if err != nil {
panic(err)
}
// Use the beatmap object
fmt.Println("Loaded beatmap:", beatmap.FormatName())
}
package main
import (
"os"
"github.com/hexis-revival/hbxml"
)
func main() {
beatmap := hbxml.Beatmap{
Version: "1",
// ...
}
file, err := os.Create("output.hbxml")
if err != nil {
panic(err)
}
defer file.Close()
if err := beatmap.Serialize(file); err != nil {
panic(err)
}
}