added SelectNodesDirect function

This commit is contained in:
Kevin Darlington 2015-02-03 13:30:24 -08:00
parent 89d27a9dee
commit 1145e04eb0
3 changed files with 57 additions and 8 deletions

View file

@ -86,6 +86,12 @@ func (this *Document) SelectNodes(namespace, name string) []*Node {
return this.Root.SelectNodes(namespace, name)
}
// Select all nodes directly under this document, with the given namespace
// and name. Returns an empty slice if no matches were found.
func (this *Document) SelectNodesDirect(namespace, name string) []*Node {
return this.Root.SelectNodesDirect(namespace, name)
}
// Select all nodes with the given namespace and name, also recursing into the
// children of those matches. Returns an empty slice if no matches were found.
func (this *Document) SelectNodesRecursive(namespace, name string) []*Node {