Module ImportFrom alias ImportFrom alias ImportFrom alias TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias alias alias alias alias ImportFrom alias alias alias alias Assign NameStore Str Assign NameStore BinOpMod Str NameLoad Expr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body TryExcept body Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad handlers ExceptHandler body Raise NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str If CompareNotEq NameLoad NameLoad body Assign NameStore Str orelse If CompareNotEq NameLoad NameLoad body Assign NameStore Str orelse Assign NameStore Call NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr keyword NameLoad If CompareEq Call NameLoad NameLoad Num body Raise Assign NameStore Str handlers ExceptHandler body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr ListLoad For NameStore NameLoad body Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call NameLoad Call AttributeLoad NameLoad attr Str Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr ListComp Call NameLoad Call AttributeLoad NameLoad attr Str comprehension NameStore Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr CompareEq Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str orelse If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareEq NameLoad BinOpAdd NameLoad Str body If CompareIs NameLoad NameLoad body Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str orelse If Call AttributeLoad NameLoad attr BinOpMod Str NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Return NameLoad orelse If CompareEq NameLoad BinOpAdd NameLoad Str body Return Call NameLoad NameLoad orelse If CompareEq NameLoad BinOpAdd NameLoad Str body Return Call NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Assign NameStore Call NameLoad NameLoad NameLoad If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Str body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict For NameStore Call NameLoad Num Call NameLoad NameLoad body Assign NameStore Dict TupleLoad NameLoad Str Call NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Dict TupleLoad NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Call NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assert AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assert AttributeLoad NameLoad attr Assign NameStore Dict TupleLoad NameLoad Str Call NameLoad NameLoad Assign NameStore Dict TupleLoad NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad Dict Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Dict Assign NameStore Dict If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index TupleLoad NameLoad Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index TupleLoad NameLoad Str Str orelse If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index TupleLoad NameLoad Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index TupleLoad NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str orelse Raise Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A xml.sax.saxutils XMLGenerator xml.dom XML_NAMESPACE xml.sax.xmlreader AttributesNSImpl N/A N/A xml.etree cElementTree ElementTree N/A N/A N/A ImportError N/A elementtree ElementTree rdflib Literal URIRef BNode Graph Variable rdflib.query Result ResultParser ResultSerializer ResultException N/A SPARQL_XML_NAMESPACE http://www.w3.org/2005/sparql-results# N/A RESULTS_NS_ET N/A {%s} SPARQL_XML_NAMESPACE N/A A Parser for SPARQL results in XML:

http://www.w3.org/TR/rdf-sparql-XMLres/

Bits and pieces borrowed from:
http://projects.bigasterisk.com/sparqlhttp/

Authors: Drew Perttula, Gunnar Aastrand Grimnes
 XMLResultParser N/A ResultParser N/A parse N/A N/A self source N/A N/A N/A N/A XMLResult source N/A N/A XMLResult N/A Result N/A __init__ N/A N/A self source N/A N/A N/A xmlstring N/A N/A source read N/A N/A isinstance xmlstring unicode N/A N/A xmlstring N/A N/A xmlstring encode utf-8 N/A N/A N/A tree N/A N/A ElementTree fromstring xmlstring N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A N/A e __class__ N/A error parsing %r: %s N/A xmlstring e N/A N/A N/A N/A e N/A boolean N/A N/A tree find N/A RESULTS_NS_ET boolean N/A results N/A N/A tree find N/A RESULTS_NS_ET results N/A N/A boolean None N/A N/A type_ ASK N/A N/A N/A results None N/A N/A type_ SELECT N/A N/A g N/A Graph N/A N/A N/A N/A N/A g parse data xmlstring N/A N/A N/A len g 0 N/A N/A N/A type_ CONSTRUCT N/A N/A N/A N/A N/A ResultException No RDF Graph, result-bindings or boolean answer found! N/A N/A N/A Result __init__ self type_ N/A N/A type_ SELECT N/A N/A N/A self bindings N/A N/A result results N/A N/A r N/A N/A binding result N/A N/A N/A r N/A N/A Variable N/A N/A binding get name N/A parseTerm N/A binding N/A 0 N/A N/A N/A N/A self bindings append r N/A N/A self vars N/A N/A Variable N/A N/A x get name N/A x N/A N/A tree findall N/A ./%shead/%svariable N/A RESULTS_NS_ET RESULTS_NS_ET N/A N/A N/A type_ ASK N/A N/A N/A self askAnswer N/A N/A N/A N/A N/A N/A boolean text lower strip true N/A N/A N/A type_ CONSTRUCT N/A N/A N/A self graph g N/A N/A parseTerm N/A N/A element N/A N/A N/A rdflib object (Literal, URIRef, BNode) for the given
    elementtree element N/A N/A tag text N/A N/A element tag N/A element text N/A N/A tag N/A RESULTS_NS_ET literal N/A N/A N/A text None N/A N/A text N/A datatype None N/A lang None N/A N/A N/A element get datatype None N/A N/A datatype N/A URIRef N/A N/A element get datatype N/A N/A N/A N/A element get N/A {%s}lang XML_NAMESPACE None N/A N/A lang N/A N/A element get N/A {%s}lang XML_NAMESPACE N/A ret N/A Literal text datatype datatype lang lang N/A ret N/A N/A N/A tag N/A RESULTS_NS_ET uri N/A N/A N/A URIRef text N/A N/A N/A tag N/A RESULTS_NS_ET bnode N/A N/A N/A BNode text N/A N/A N/A TypeError N/A unknown binding type %r element N/A XMLResultSerializer N/A ResultSerializer N/A __init__ N/A N/A self result N/A N/A N/A N/A N/A ResultSerializer __init__ self result N/A serialize N/A N/A self stream encoding N/A utf-8 N/A N/A writer N/A SPARQLXMLWriter stream encoding N/A N/A N/A N/A self result type ASK N/A N/A N/A N/A writer write_header N/A N/A N/A N/A writer write_ask N/A N/A self result askAnswer N/A N/A N/A N/A writer write_header N/A N/A self result vars N/A N/A N/A writer write_results_header N/A b N/A N/A self result bindings N/A N/A N/A N/A writer write_start_result N/A N/A key val N/A N/A b iteritems N/A N/A N/A N/A writer write_binding key val N/A N/A N/A writer write_end_result N/A N/A N/A writer close N/A N/A SPARQLXMLWriter N/A N/A N/A 
    Python saxutils-based SPARQL XML Writer
     __init__ N/A N/A self output encoding N/A utf-8 N/A N/A writer N/A XMLGenerator output encoding N/A N/A N/A writer startDocument N/A N/A N/A writer startPrefixMapping sparql SPARQL_XML_NAMESPACE N/A N/A N/A writer startPrefixMapping xml XML_NAMESPACE N/A N/A N/A writer startElementNS N/A SPARQL_XML_NAMESPACE sparql sparql N/A AttributesNSImpl N/A N/A N/A N/A self writer writer N/A N/A self _output output N/A N/A self _encoding encoding N/A N/A self _results False N/A write_header N/A N/A self allvarsL N/A N/A N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE head head N/A AttributesNSImpl N/A N/A N/A i N/A xrange 0 N/A len allvarsL N/A N/A attr_vals N/A N/A None name N/A unicode N/A allvarsL N/A i N/A attr_qnames N/A N/A None name name N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE variable variable N/A AttributesNSImpl attr_vals attr_qnames N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE variable variable N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE head head N/A write_ask N/A N/A self val N/A N/A N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE boolean boolean N/A AttributesNSImpl N/A N/A N/A N/A N/A N/A self writer characters N/A N/A N/A str val lower N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE boolean boolean N/A write_results_header N/A N/A self N/A N/A N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE results results N/A AttributesNSImpl N/A N/A N/A N/A self _results True N/A write_start_result N/A N/A self N/A N/A N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE result result N/A AttributesNSImpl N/A N/A N/A N/A self _resultStarted True N/A write_end_result N/A N/A self N/A N/A N/A N/A self _resultStarted N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE result result N/A N/A self _resultStarted False N/A write_binding N/A N/A self name val N/A N/A N/A N/A self _resultStarted N/A attr_vals N/A N/A None name N/A unicode name N/A attr_qnames N/A N/A None name name N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE binding binding N/A AttributesNSImpl attr_vals attr_qnames N/A N/A isinstance val URIRef N/A N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE uri uri N/A AttributesNSImpl N/A N/A N/A N/A N/A N/A self writer characters val N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE uri uri N/A N/A N/A isinstance val BNode N/A N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE bnode bnode N/A AttributesNSImpl N/A N/A N/A N/A N/A N/A self writer characters val N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE bnode bnode N/A N/A N/A isinstance val Literal N/A N/A attr_vals N/A N/A attr_qnames N/A N/A N/A val language N/A N/A N/A attr_vals N/A N/A XML_NAMESPACE lang N/A val language N/A N/A attr_qnames N/A N/A XML_NAMESPACE lang xml:lang N/A N/A N/A val datatype N/A N/A N/A attr_vals N/A N/A None datatype N/A val datatype N/A N/A attr_qnames N/A N/A None datatype datatype N/A N/A N/A N/A self writer startElementNS N/A SPARQL_XML_NAMESPACE literal literal N/A AttributesNSImpl attr_vals attr_qnames N/A N/A N/A N/A self writer characters val N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE literal literal N/A N/A N/A Exception N/A Unsupported RDF term: %s val N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE binding binding N/A close N/A N/A self N/A N/A N/A N/A self _results N/A N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE results results N/A N/A N/A N/A self writer endElementNS N/A SPARQL_XML_NAMESPACE sparql sparql N/A N/A N/A N/A self writer endDocument N/A N/A