common

package
v0.0.0-...-eb760cf Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCountOfChildNodesWithRequiredValues

func GetCountOfChildNodesWithRequiredValues(
	nodes []xutils.XpathNode,
	filterValueMap map[xutils.XFilter]string,
) int

GetCountOfChildNodesWithRequiredValues - return the number of child nodes that match the required set of {name, value} pairs.

func GetDescendantNodes

func GetDescendantNodes(
	nodes []xutils.XpathNode,
	path []xutils.XFilter,
) []xutils.XpathNode

GetDescendantNodes - walk the provided path for all initial nodes to find all descendant nodes that match it.

func GetDescendantNodesFromSingleNode

func GetDescendantNodesFromSingleNode(
	node xutils.XpathNode,
	path []xutils.XFilter,
) []xutils.XpathNode

GetDescendantNodesFromSingleNode - walk the provided path for the initial node to find all descendant nodes that match it.

func GetFilter

func GetFilter(name string) xutils.XFilter

GetFilter

func GetSingleChildValue

func GetSingleChildValue(node xutils.XpathNode, filter xutils.XFilter,
) (string, bool)

GetSingleChildValue - return value of child node, if there's only one. Otherwise return false (error). Wraps logic of getting value of child node where we expect only a single child.

Types

This section is empty.

Jump to

Keyboard shortcuts

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