(start xml.StartElement, n *Node)
| 399 | } |
| 400 | |
| 401 | func (d *Decoder) decInstanceGeometry(start xml.StartElement, n *Node) error { |
| 402 | |
| 403 | // Creates new InstanceGeometry,sets its attributes and associates with node |
| 404 | ig := new(InstanceGeometry) |
| 405 | ig.Url = findAttrib(start, "url").Value |
| 406 | ig.Name = findAttrib(start, "name").Value |
| 407 | n.Instance = ig |
| 408 | |
| 409 | // Decodes instance geometry children |
| 410 | for { |
| 411 | // Get next child element |
| 412 | child, _, err := d.decNextChild(start) |
| 413 | if err != nil || child.Name.Local == "" { |
| 414 | return err |
| 415 | } |
| 416 | // Decodes bind_material |
| 417 | if child.Name.Local == "bind_material" { |
| 418 | err := d.decBindMaterial(child, &ig.BindMaterial) |
| 419 | if err != nil { |
| 420 | return err |
| 421 | } |
| 422 | continue |
| 423 | } |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | func (d *Decoder) decBindMaterial(start xml.StartElement, dest **BindMaterial) error { |
| 428 |
no test coverage detected