title: I have a 100+MB XML file (sans-DTD/Schema). XSLT won't have it. Strategies for transforming/parsing?
body: <p>This XML file contained archived news stories for all of last year. I was asked to sort these stories by story categor[y|ies] into new XML files.</p>
  
  <pre><code>big_story_export.xml
  </code></pre>
  
  <p>turns into</p>
  
  <pre><code>lifestyles.xml
  food.xml
  nascar.xml
  </code></pre>
  
  <p>...and so on.</p>
  
  <p>I got the job done using a one-off python script, <em>however</em>, <strong>I originally attempted this using XSLT</strong>. This resulted in frustration as my XPATH selections were crapping the bed. Test files were transformed perfectly, but putting the big file up against my style sheet resulted in ...<em>nothing</em>.</p>
  
  <p>What strategies do you recommend for ensuring that files like this will run through XSLT? <em>This was handed to me by a vendor, so imagine that I don't have a lot of leverage when it comes to defining the structure of this file.</em></p>
  
  <p>If you guys want code samples, I'll put some together. </p>
  
  <p>If anything, I'd be satisfied with some tips for making XML+XSLT work together smoothly.</p>
  
  <hr>
  
  <p>@Sklivvz</p>
  
  <p>I was using python's libxml2 &amp; libxslt to process this. I'm looking into xsltproc now. </p>
  
  <p>It seems like a good tool for these one-off situations. Thanks!</p>
  
  <hr>
  
  <p>@diomidis-spinellis</p>
  
  <p>It's well-formed, though (as mentioned) I don't have faculties to discover it's validity.</p>
  
  <p>As for writing a Schema, I like the idea. </p>
  
  <p>The amount of time I invest in getting this one file validated would be impractical if it were a one-time thing, though I foresee having to handle more files like this from our vendor.</p>
  
  <p>Writing a schema (and submitting it to the vendor) would be an excellent long-term strategy for managing XML funk like this. Thanks!</p>