Module Expr Str Import alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Import alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotIn NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assert CompareIn NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num If Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Slice Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str CompareNotEq SubscriptLoad NameLoad Index Num Str body If UnaryOpNot CompareEq AttributeLoad Call AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num body Return Assign NameStore BinOpAdd Str SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot CompareIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Num For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad BinOpMult Str AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr BinOpMult Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr BinOpMult Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AugAssignSub AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr BinOpMult Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Return For NameStore Call NameLoad AttributeLoad NameLoad attr body AugAssignSub AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad BinOpMult Str AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A Bulkloader XML reading and writing.

Handle the XML format specified in a bulkloader.yaml file.
 N/A codecs N/A logging N/A re N/A N/A xml.etree ElementTree N/A N/A N/A ImportError N/A N/A google N/A cElementTree ElementTree xml.sax saxutils google.appengine.ext.bulkload bulkloader_errors google.appengine.ext.bulkload connector_interface N/A NODE_PATH_ONLY_RE (/[a-zA-Z][a-zA-Z0-9]*)+$ SimpleXmlConnector N/A N/A connector_interface ConnectorInterface N/A N/A Read/write a simply-structured XML file and convert dicts for each record.

  A simply-structed XML file is one where we can locate all interesting nodes
  with a simple (ElementTree supported) xpath, and each node contains either
  all the info we care about as child (and not grandchild) nodes with text or
  as attributes.
  We'll also pass the entire node in case the developer wants to do something
  more interesting with it (occasional grandchildren, parents, etc.).

  This is of course a fairly expensive way to read XML--we build a DOM, then
  copy parts of it into a dict. A pull model would work well with the interface
  too.
   N/A ELEMENT_CENTRIC 1 N/A ATTRIBUTE_CENTRIC 2 create_from_options N/A N/A cls options name N/A N/A N/A Factory using an options dictionary.

    Args:
      options: Dictionary of options. Must contain:
        * xpath_to_nodes: The xpath to select a record.
        * style: 'element_centric' or 'attribute_centric'
      name: The name of this transformer, for use in error messages.

    Returns:
      XmlConnector connector object described by the specified options.

    Raises:
      InvalidConfiguration: If the config is invalid.
     N/A xpath_to_nodes N/A N/A options get xpath_to_nodes N/A N/A xpath_to_nodes N/A N/A N/A N/A bulkloader_errors InvalidConfiguration N/A simplexml must specify xpath_to_nodes. (In transformer named %s) name N/A N/A N/A N/A re match NODE_PATH_ONLY_RE xpath_to_nodes N/A N/A N/A N/A logging warning simplexml export only supports very simple /root/to/node xpath_to_nodes for now. N/A xml_style N/A N/A options get style N/A xml_style_mapping N/A element_centric attribute_centric N/A cls ELEMENT_CENTRIC N/A cls ATTRIBUTE_CENTRIC N/A N/A xml_style xml_style_mapping N/A N/A N/A N/A bulkloader_errors InvalidConfiguration N/A simplexml must specify one of these valid xml_style options: "%s". You specified %s in transformer named %s. N/A N/A N/A ", " join N/A N/A xml_style_mapping keys xml_style name N/A N/A cls xpath_to_nodes N/A xml_style_mapping N/A xml_style N/A classmethod __init__ N/A N/A self xpath_to_nodes xml_style N/A N/A N/A Constructor.

    Args:
      xpath_to_nodes: xpath to the nodes to run over.
      xml_style: ELEMENT_CENTRIC or ATTRIBUTE_CENTRIC--we'll
        either convert the list of elements to a dict (last element of the same
        name will be used) or the list of attributes.

    Raises:
      InvalidConfiguration: If the config is invalid.
     N/A N/A self xpath_to_nodes xpath_to_nodes N/A N/A xml_style N/A N/A self ELEMENT_CENTRIC N/A self ATTRIBUTE_CENTRIC N/A N/A self xml_style xml_style N/A N/A self output_stream None N/A N/A self bulkload_state None N/A N/A self depth 0 N/A N/A N/A re match NODE_PATH_ONLY_RE xpath_to_nodes N/A N/A N/A self node_list N/A N/A N/A N/A self xpath_to_nodes split / N/A 1 N/A N/A self entity_node N/A N/A self node_list N/A -1 N/A N/A self node_list N/A N/A self node_list N/A -1 N/A N/A N/A self node_list None N/A N/A self entity_node None N/A N/A self node_list None N/A generate_import_record N/A N/A self filename bulkload_state N/A N/A N/A Generator, yields dicts for nodes found as described in the options. N/A N/A self bulkload_state bulkload_state N/A tree N/A N/A ElementTree parse filename N/A xpath_to_nodes N/A self xpath_to_nodes N/A N/A N/A N/A len xpath_to_nodes 1 N/A N/A xpath_to_nodes N/A 0 / N/A N/A xpath_to_nodes N/A 1 / N/A N/A N/A N/A N/A N/A N/A tree getroot tag N/A N/A N/A xpath_to_nodes split / N/A 1 N/A N/A N/A xpath_to_nodes N/A / N/A N/A N/A xpath_to_nodes split / 2 N/A 2 N/A nodes N/A N/A tree findall xpath_to_nodes N/A node nodes N/A N/A N/A N/A self xml_style N/A self ELEMENT_CENTRIC N/A N/A input_dict N/A N/A child N/A N/A node getchildren N/A N/A N/A N/A N/A child tag input_dict N/A N/A N/A input_dict N/A N/A child tag N/A child text N/A N/A input_dict N/A dict N/A N/A node items N/A N/A input_dict N/A __node__ node N/A N/A input_dict N/A initialize_export N/A N/A self filename bulkload_state N/A N/A N/A Initialize the output file. N/A N/A self bulkload_state bulkload_state N/A N/A N/A self node_list N/A N/A N/A N/A bulkloader_errors InvalidConfiguration simplexml export only supports simple /root/to/node xpath_to_nodes for now. N/A N/A self output_stream N/A N/A codecs open filename wb utf-8 N/A N/A N/A N/A self output_stream write <?xml version="1.0"?>
 N/A N/A self depth 0 N/A node N/A self node_list N/A N/A N/A N/A N/A self output_stream write N/A %s<%s>
 N/A N/A N/A self depth node N/A N/A self depth 1 N/A N/A self indent N/A N/A self depth N/A write_iterable_as_elements N/A N/A self values N/A N/A N/A Write a dict as elements, possibly recursively. N/A N/A isinstance values dict N/A N/A values N/A N/A values iteritems N/A N/A name value values N/A N/A N/A isinstance value basestring N/A N/A N/A N/A N/A self output_stream write N/A %s <%s>%s</%s>
 N/A N/A self indent name N/A N/A saxutils escape value name N/A N/A N/A N/A N/A self output_stream write N/A %s <%s>
 N/A N/A self indent name N/A N/A self depth 1 N/A N/A self indent N/A N/A self depth N/A N/A N/A self write_iterable_as_elements value N/A N/A self depth 1 N/A N/A self indent N/A N/A self depth N/A N/A N/A N/A self output_stream write N/A %s </%s>
 N/A N/A self indent name N/A write_dict N/A N/A self dictionary N/A N/A N/A Write one record for the specified entity. N/A N/A N/A self xml_style N/A self ELEMENT_CENTRIC N/A N/A N/A N/A N/A self output_stream write N/A %s<%s>
 N/A N/A self indent N/A self entity_node N/A N/A N/A self write_iterable_as_elements dictionary N/A N/A N/A N/A self output_stream write N/A %s</%s>
 N/A N/A self indent N/A self entity_node N/A N/A N/A N/A N/A self output_stream write N/A %s<%s  N/A N/A self indent N/A self entity_node N/A N/A name value N/A N/A dictionary iteritems N/A N/A N/A N/A N/A self output_stream write N/A %s=%s  N/A name N/A N/A saxutils quoteattr value N/A N/A N/A N/A self output_stream write />
 N/A finalize_export N/A N/A self N/A N/A N/A N/A N/A self output_stream N/A N/A N/A node N/A reversed N/A self node_list N/A N/A N/A self depth 1 N/A N/A N/A N/A self output_stream write N/A %s</%s>
 N/A N/A N/A self depth node N/A N/A N/A N/A self output_stream close N/A N/A self output_stream None N/A N/A