()
| 153 | } |
| 154 | |
| 155 | func (x *NodeNavigator) NodeType() xpath.NodeType { |
| 156 | switch x.curr.Type { |
| 157 | case CommentNode: |
| 158 | return xpath.CommentNode |
| 159 | case TextNode, CharDataNode, NotationNode: |
| 160 | return xpath.TextNode |
| 161 | case DeclarationNode, DocumentNode: |
| 162 | return xpath.RootNode |
| 163 | case ElementNode: |
| 164 | if x.attr != -1 { |
| 165 | return xpath.AttributeNode |
| 166 | } |
| 167 | return xpath.ElementNode |
| 168 | case ProcessingInstruction: // Keep backward compatibility |
| 169 | return xpath.ElementNode |
| 170 | } |
| 171 | panic(fmt.Sprintf("unknown XML node type: %v", x.curr.Type)) |
| 172 | } |
| 173 | |
| 174 | func (x *NodeNavigator) LocalName() string { |
| 175 | if x.attr != -1 { |
no outgoing calls
no test coverage detected