Help us shape the future of Go! Take the 2026 Go Developer Survey

xmlpath

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package xmlpath selects values from an XML document with the small part of XPath that reading an answer needs: absolute and "//" paths, element names (matched by local name, since a server's namespace prefix is its own choice), "*", "[n]", "[last()]", "[@attr='value']", "@attr" and "text()". It is not XPath: no axes, functions or predicates on child text. The WebDAV 207 answer is the case it is for.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Select

func Select(doc, path string) ([]string, error)

Select returns the text of each node path selects, in document order: an element's own and its descendants' text, an attribute's value, or the direct text for text(). It returns none when nothing matches; an error says the path or the document cannot be read.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL