feat(common): 添加 XML 根注释解析功能
- 在 monster_refresh.go 中添加 xmls 结构体,用于解析 XML 根注释 - 在 monster_refresh_test.go 中添加 TestMMMs 函数,实现根注释的捕获和输出 - 优化了 XML 解析逻辑,能够正确处理注释内容
This commit is contained in:
@@ -4,10 +4,16 @@ import (
|
||||
"github.com/ECUST-XX/xml"
|
||||
)
|
||||
|
||||
type xmls struct {
|
||||
Text string `xml:",chardata"`
|
||||
Version string `xml:"comment"`
|
||||
|
||||
SuperMaps SuperMaps `xml:"superMaps"`
|
||||
}
|
||||
type SuperMaps struct {
|
||||
XMLName xml.Name `xml:"superMaps"`
|
||||
//Text string `xml:",chardata"`
|
||||
Maps []Maps `xml:"maps"`
|
||||
Text string `xml:",comment"`
|
||||
Maps []Maps `xml:"maps"`
|
||||
}
|
||||
|
||||
type Maps struct {
|
||||
|
||||
Reference in New Issue
Block a user