(p *xpp.XMLPullParser)
| 690 | } |
| 691 | |
| 692 | func (rp *Parser) parseSkipHours(p *xpp.XMLPullParser) ([]string, error) { |
| 693 | if err := p.Expect(xpp.StartTag, "skiphours"); err != nil { |
| 694 | return nil, err |
| 695 | } |
| 696 | |
| 697 | hours := []string{} |
| 698 | |
| 699 | for { |
| 700 | tok, err := shared.NextTag(p) |
| 701 | if err != nil { |
| 702 | return nil, err |
| 703 | } |
| 704 | |
| 705 | if tok == xpp.EndTag { |
| 706 | break |
| 707 | } |
| 708 | |
| 709 | if tok == xpp.StartTag { |
| 710 | name := strings.ToLower(p.Name) |
| 711 | if name == "hour" { |
| 712 | result, err := shared.ParseText(p) |
| 713 | if err != nil { |
| 714 | return nil, err |
| 715 | } |
| 716 | hours = append(hours, result) |
| 717 | } else { |
| 718 | p.Skip() |
| 719 | } |
| 720 | } |
| 721 | } |
| 722 | |
| 723 | if err := p.Expect(xpp.EndTag, "skiphours"); err != nil { |
| 724 | return nil, err |
| 725 | } |
| 726 | |
| 727 | return hours, nil |
| 728 | } |
| 729 | |
| 730 | func (rp *Parser) parseSkipDays(p *xpp.XMLPullParser) ([]string, error) { |
| 731 | if err := p.Expect(xpp.StartTag, "skipdays"); err != nil { |
no test coverage detected