Help parsing a text file

JT james.thornton at gmail.com
Thu Sep 1 19:58:54 CEST 2011


On Monday, August 29, 2011 1:21:48 PM UTC-5, William Gill wrote:
> 
> I have a text file with XML like records that I need to parse.  By XML 
> like I mean records have proper opening and closing tags. but fields 
> don't have closing tags (they rely on line ends).  Not all fields appear 
> in all records, but they do adhere to a defined sequence.

lxml can parse XML and broken HTML (see http://lxml.de/parsing.html).

- James

-- 
Bulbflow: A Python framework for graph databases (http://bulbflow.com)



More information about the Python-list mailing list