From: Alex Young Date: 2007-09-14T04:55:09+09:00 Subject: Re: Bypassing XML inconsistencies with REXML::StreamListener nutsmuggler wrote: > Hello folks. > I am trying to build a simple XML parser to extract data from IBM > translation manager memories. Here is a sample os such memory files: > > > > > > 0000000001 > > 00012200000001178876638English(U.S.)ITALIANIBMIDDOCBB1CTMST. > 000BB1CTmst.idd > > noteindent="no-noteindent" > brand="default-brand"> > noteindent="no-noteindent" > brand="default-brand"> > > 0000000002 > > 00000300000001178876638English(U.S.)ITALIANIBMIDDOCCONFIGUR. > 000Configuration_PDSG.IDE > > > Configuration information and guidelines > > > Informazioni e istruzioni per la configurazione > > etc... > > > These memory files are quite similar to XML files, but I suspect they > actually conform to another standard. In fact, they often include > "opened" tags; these because they store segments of translation; thus, > when the translation is referred to a website or a SGML document, the > original HTML or SGML might be split in two or more parts. So I often > encounter faulty segments; open tags generate a REXML fault. It might be worth trying HTML Tidy in XML mode. I can't remember off the top of my head how it'll react to missing close tags, but it's worth a shot... -- Alex