[Pyparsing] not working when reading file
Brought to you by:
ptmcg
From: Szabo, P. \(LNG-VIE\) <pat...@le...> - 2012-08-14 14:14:25
|
Hi, We are using PyParse to find and mark certain citations in xml files. It works great for the most part (which tells me our regex and matching is correct) but sometimes it misses some stuff. The really weird thing about that is if I test those strings in Eclipse by simply giving the function a long string that represents an xml file everything works fine and all the citations are found and marked. However if I read the xml files using python's open (which should give me the very same string) it doesn't work i.e. the citations are not marked or even found. The encoding is always iso-8859-1 and that problem only occurs with certain files or sometimes even only parts of files. You can find the source here: http://pastebin.com/F6c8PTfd I can't provide everything because I'm not allowed but I hope you can help me. Best regards . . . . . . . . . . . . . . . . . . . . . . . . . . Developer Patrick Szabo Developer LexisNexis A-1030 Wien, Marxergasse 25 mailto:pat...@le... Tel.: +43 1 53452 1573 Fax: +43 1 534 52 146 |