I am attempting to process rdf that has characters outside the ASCII range, and am getting a SAXParseException: not well-formed (invalid token)
Call: store = ConjunctiveGraph() store.load("ToolsTestA0Removed.rdf") I thought this might be corrected by adding the encoding tot the top of the file: <?xml version='1.0' encoding='UTF-8'?> But this did not correct the problem. Is there a parsing option that I've missed, or some other error I'm making? Will utf-8 encoding work for characters like hex A0 or hex 92? Thanks in advance for help Dave J Trace: Traceback (most recent call last): File "C:\nbo\rdf2Forms.py", line 18, in <module> store.load("endpoint/ToolsTestA0Removed.rdf") # Saved by makeTriples.py. File "build\bdist.win32\egg\rdflib\Graph.py", line 665, in load self.parse(source, publicID, format) File "build\bdist.win32\egg\rdflib\Graph.py", line 828, in parse context.parse(source, publicID=publicID, format=format, **args) File "build\bdist.win32\egg\rdflib\Graph.py", line 661, in parse parser.parse(source, self, **args) File "build\bdist.win32\egg\rdflib\syntax\parsers\RDFXMLParser.py", line 37, in parse self._parser.parse(source) File "c:\python25\lib\xml\sax\expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "c:\python25\lib\xml\sax\xmlreader.py", line 123, in parse self.feed(buffer) File "c:\python25\lib\xml\sax\expatreader.py", line 211, in feed self._err_handler.fatalError(exc) File "c:\python25\lib\xml\sax\handler.py", line 38, in fatalError raise exception SAXParseException: file:///C|/ToolsTestA0Removed.rdf:373:684: not well-formed (invalid token) _______________________________________________ Dev mailing list Dev@rdflib.net http://rdflib.net/mailman/listinfo/dev