View source on GitHub |
Provides logic for walking down XML tree and pulling data.
Inherits From: expected_type
Methods
Parse
Parse(
xml_str
)
Parses XML string and returns object representation of relevant info.
Args | |
---|---|
xml_str
|
The XML string. |
Returns | |
---|---|
An IndexDefinitions object containing the result of parsing the XML.
|
Raises | |
---|---|
ValidationError
|
In case of malformed XML or illegal inputs. |
ProcessIndexNode
ProcessIndexNode(
node
)
Processes XML <datastore-index>
nodes into Index
objects.
The following information is parsed out:
kind
: Specifies the kind of entities to index.ancestor
:True
if the index supports queries that filter byancestor-key
to constraint results to a single entity group.property
: Represents the entity properties to index, with a name and direction attribute.
Args | |
---|---|
node
|
<datastore-index> XML node in datastore-indexes.xml .
|