query1293%python.module
fault.route

Tools for navigating element trees.

Provides the Cursor class for navigating and retrieving nodes identified using a limited path language.

Sequence
import

Mapping
import

itertools0
import

functools0
import

comethod0
import

keywords0
import

InvalidPath0
class

Path string given to Context.prepare was not valid.

iselement0
function

iselement(subject)

Determines whether the given object has the properties of an element.

Context0
class

Query expression context for parsing and interpreting paths.

Contextprepare0
method

prepare(self, path)

Parse the path string into a selection plan.

Context_paths_profile0
data

_paths_profile = keywords.Profile.from_keywords_v1(
	routers = ["/"],
	operations = [
		"*", # Match any immediate descendant.
		"#", # Slice nodes. 1-based, inclusive.
		"?", # Apply context designated filter.
			"\\\\", # Escape backslash in predicate string.
		"\\]", # Escape predicate close.
		"|",
	],
	terminators = [],
	enclosures = [],
	literals = [
		["[", "]"], # Predicates are text strings.
	],
)

Context_parser0
data

_parser = keywords.Parser.from_profile(_paths_profile).process_document

Context__init__0
method

__init__(self, selectors, aliases)

Context_identify_node0
staticmethod

_identify_node(predicate, node)

Context_parse_slice0
staticmethod

_parse_slice(string)

Context_read_string280%
staticmethod

_read_string(itokens)

Contextstructure888%
method

structure(self, tokens)

Process tokens into selector sequences. Usually used indirectly by prepare.

Context_select0
method

_select(self, nodes, ident)

Context_index0
method

_index(self, nodes, eslice)

Context_predicate0
method

_predicate(self, nodes, title)

Context_all0
method

_all(self, nodes, type)

Context_filter275%
method

_filter(self, nodes, *spec)

Context_union0
method

_union(self, origin_nodes, exprnodes)

Contextswitch0
method

switch(self, operation, nodes)

Contextinterpret0
method

interpret(self, plan, root, context)

Cursor0
class

Navigation state class providing a query interface to an element tree.

Cursor__init__0
method

__init__(self, context, root)

Cursorseek0
method

seek(self, path)

Adjust the cursor position to the nodes identified by path.

Cursorreset0
method

reset(self)

Select the root as the current working node.

Cursorfork0
method

fork(self, path)

Create a new instance using the given path to the select the nodes used as the root content of the new Cursor.

Cursorselect0
method

select(self, path)

Retrieve nodes relative to the context node using path.