mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 13:56:32 +08:00
1 parent
17a9a03361
commit
c4b81155a9
19 files changed
+410
-142
No files matched your search
@@ -139,6 +139,23 @@ type actionSource struct {
|
||||
Graphic bool
|
||||
}
|
||||
|
||||
// decodeOFDActions 读取标准动作列表,不将外部同名节点作为交互动作
|
||||
// 入参: d XML解码器, start 列表起始节点, actions 动作接收列表
|
||||
// 返回: error 解析错误
|
||||
func decodeOFDActions(d *xml.Decoder, start xml.StartElement, actions *[]Action) error {
|
||||
return decodeOFDChildren(d, start, func(d *xml.Decoder, node xml.StartElement) error {
|
||||
if node.Name.Local != "Action" {
|
||||
return d.Skip()
|
||||
}
|
||||
var action Action
|
||||
if err := d.DecodeElement(&action, &node); err != nil {
|
||||
return err
|
||||
}
|
||||
*actions = append(*actions, action)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
// UnmarshalXML 解析跳转目标
|
||||
// 入参: d XML解码器, start 起始节点
|
||||
// 返回: error 错误信息
|
||||
|
||||
Reference in new issue
Block a user