title: MediaWiki extension: get sections or structured article text from WikiPage/ParserOutput
body: <p>I am using the following to get a WikiPage and ParserOutput:</p>
  
  <p><code>$parserOutput = WikiPage::factory(Title::newFromText('sometitle'))
  -&gt;getParserOutput(new ParserOptions());</code></p>
  
  <p>Then, I can see the sections in the article:</p>
  
  <p><code>print_r($parserOutput-&gt;getSections());</code></p>
  
  <p>But, this just gives me a section title and information about the order/TOC level.</p>
  
  <p><strong>How can I go from here to getting the text content of the section?</strong></p>
  
  <p>Alternative question: how can I get <em>structured</em> data from an article? That is, I want to go from an article title to an object with a map of sections to text.</p>