Re: expat parsing error

2010-06-02 Thread kak...@gmail.com
On 2 Ιούν, 03:47, John Machin sjmac...@lexicon.net wrote: On Jun 2, 1:57 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:12 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:09 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes:

Re: expat parsing error

2010-06-01 Thread John Bokma
kak...@gmail.com kak...@gmail.com writes: I got the following error --- exception caught here --- File /usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux- x86_64.egg/twisted/internet/selectreactor.py, line 146, in _doReadOrWrite why = getattr(selectable, method)() File

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 9:51 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes: I got the following error --- exception caught here ---   File /usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux- x86_64.egg/twisted/internet/selectreactor.py, line 146, in

Re: expat parsing error

2010-06-01 Thread John Bokma
kak...@gmail.com kak...@gmail.com writes: On Jun 1, 9:51 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes: I got the following error --- exception caught here ---   File /usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-

Re: expat parsing error

2010-06-01 Thread Stefan Behnel
kak...@gmail.com, 01.06.2010 16:00: how can i fix it, how to ignore the headers and parse only the XML? Consider reading the answers you got in the last thread that you opened with exactly this question. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 10:34 am, Stefan Behnel stefan...@behnel.de wrote: kak...@gmail.com, 01.06.2010 16:00: how can i fix it, how to ignore the headers and parse only the XML? Consider reading the answers you got in the last thread that you opened with exactly this question. Stefan That's

Re: expat parsing error

2010-06-01 Thread John Bokma
kak...@gmail.com kak...@gmail.com writes: On Jun 1, 10:34 am, Stefan Behnel stefan...@behnel.de wrote: kak...@gmail.com, 01.06.2010 16:00: how can i fix it, how to ignore the headers and parse only the XML? Consider reading the answers you got in the last thread that you opened with

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 11:09 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes: On Jun 1, 10:34 am, Stefan Behnel stefan...@behnel.de wrote: kak...@gmail.com, 01.06.2010 16:00: how can i fix it, how to ignore the headers and parse only the XML? Consider reading

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 11:12 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:09 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes: On Jun 1, 10:34 am, Stefan Behnel stefan...@behnel.de wrote: kak...@gmail.com, 01.06.2010 16:00: how can i fix it, how

Re: expat parsing error

2010-06-01 Thread John Machin
On Jun 2, 1:57 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:12 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:09 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes: On Jun 1, 10:34 am, Stefan Behnel stefan...@behnel.de wrote:

Re: expat having problems with entities (amp;)

2009-12-11 Thread Rami Chowdhury
On Fri, Dec 11, 2009 at 13:23, nnguyen nguy...@gmail.com wrote: Any ideas on any expat tricks I'm missing out on? I'm also inclined to try another parser that can keep the string together when there are entities, or at least ampersands. IIRC expat explicitly does not guarantee that character

Re: expat having problems with entities (amp;)

2009-12-11 Thread nnguyen
On Dec 11, 4:23 pm, nnguyen nguy...@gmail.com wrote: I need expat to parse this block of xml: datafield tag=991 subfield code=bc-Pamp;P/subfield subfield code=hLOT 3677/subfield subfield code=m(F)/subfield /datafield I need to parse the xml and return a dictionary that follows

Re: expat having problems with entities (amp;)

2009-12-11 Thread nnguyen
On Dec 11, 4:39 pm, Rami Chowdhury rami.chowdh...@gmail.com wrote: On Fri, Dec 11, 2009 at 13:23, nnguyen nguy...@gmail.com wrote: Any ideas on any expat tricks I'm missing out on? I'm also inclined to try another parser that can keep the string together when there are entities, or at

Re: expat error, help to debug?

2007-08-28 Thread Andreas Lobinger
Aloha, Andreas Lobinger wrote: Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Andreas Lobinger wrote: Anyone any idea where the error is produced? ... to share my findings with you: def ex(self,context,baseid,n1,n2): print x,context,n1,n2 return 1 The

Re: expat error, help to debug?

2007-08-28 Thread Andreas Lobinger
Aloha, Andreas Lobinger wrote: Andreas Lobinger wrote: Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Andreas Lobinger wrote: Anyone any idea where the error is produced? The registered Handler has to return a (integer) value. Would have been nice if this had been mentioned in the

Re: expat error, help to debug?

2007-08-27 Thread Andreas Lobinger
Aloha, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Andreas Lobinger wrote: Anyone any idea where the error is produced? Do you want to try adding an EndElementHandler as well, just to get more information on where the error might be happening? I want. Adding an EndElement (left

Re: expat error, help to debug?

2007-08-26 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Andreas Lobinger wrote: Anyone any idea where the error is produced? Do you want to try adding an EndElementHandler as well, just to get more information on where the error might be happening? -- http://mail.python.org/mailman/listinfo/python-list

Re: expat parser

2007-05-28 Thread Stefan Behnel
Sebastian Bassi wrote: I have this code: import xml.parsers.expat def start_element(name, attrs): print 'Start element:', name, attrs def end_element(name): print 'End element:', name def char_data(data): print 'Character data:', repr(data) p = xml.parsers.expat.ParserCreate()

Re: expat

2006-02-28 Thread Katja Suess
Merci à Frederik et Jarek! According to your hints I did tests with a different coding and another option in OpenOffice 'Size optimization for XML format'. Went fine! - Back to my files from yesterday the same proper converting... uups Anyway, it's running! Katja --

Re: expat

2006-02-27 Thread Fredrik Lundh
Katja Suess wrote: may I have a hint what the problem is in my situation? Is it a syntax error in sweetone.odt or in xml.parsers.expat? xml.parsers.expat.ExpatError: syntax error: line 1, column 0 it's a problem with the file you're parsing (either because it's not a valid XML file, or

Re: expat

2006-02-27 Thread Jarek Zgoda
Katja Suess napisał(a): may I have a hint what the problem is in my situation? Is it a syntax error in sweetone.odt or in xml.parsers.expat? Same problem with different file instead of sweetone.odt means that it's not the file that has a syntax error. xml.parsers.expat is a standard module

Re: Expat - how to UseForeignDTD

2005-10-20 Thread B Mahoney
I needed to set Entity Parsing, such as parser.SetParamEntityParsing( expat.XML_PARAM_ENTITY_PARSING_ALWAYS ) -- http://mail.python.org/mailman/listinfo/python-list