|
|
@ -16,6 +16,7 @@ type SheetItem interface{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type Block struct { |
|
|
type Block struct { |
|
|
|
|
|
Name string |
|
|
Items []SheetItem |
|
|
Items []SheetItem |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -105,6 +106,16 @@ func parseVariable(root xmlNode, sheet *CharacterSheet) (*Variable, error) { |
|
|
func parseBlock(root xmlNode, sheet *CharacterSheet) (*Block, error) { |
|
|
func parseBlock(root xmlNode, sheet *CharacterSheet) (*Block, error) { |
|
|
ret := &Block{} |
|
|
ret := &Block{} |
|
|
|
|
|
|
|
|
|
|
|
for i := 0; i < len(root.Attrs); i++ { |
|
|
|
|
|
attrName := root.Attrs[i].Name.Local |
|
|
|
|
|
attrVal := root.Attrs[i].Value |
|
|
|
|
|
|
|
|
|
|
|
switch attrName { |
|
|
|
|
|
case "name": |
|
|
|
|
|
ret.Name = attrVal |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
for i := 0; i < len(root.Nodes); i++ { |
|
|
for i := 0; i < len(root.Nodes); i++ { |
|
|
item, err := parseItem(root.Nodes[i], sheet) |
|
|
item, err := parseItem(root.Nodes[i], sheet) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
|