From: Roan Kattouw <roan.kattouw@gmail.com>
To: MediaWiki API announcements & discussion <mediawiki-api@lists.wikimedia.org>
Sent: Tue, May 11, 2010 3:05:19 PM
Subject: Re: [Mediawiki-api] API to get just a section of a page
2010/5/11 don undeen <
donundeen@yahoo.com>:
> ah, so it's implemented in the core code?
> I'm doing this work on my own wikis, so I can update my own wikis codebase
> to support this, perhaps.
> what version of MW is this implemented on?
>
Only on the trunk SVN version so far.
> barring that approach, I saw some references to obtaining an xml rendering
> of an entire page. Is that right?
> If I could get an xml representation of a rendered page, where each section
> is noted
in the xml somehow, I could then extract the relevent section, with
> just the additional overhead of pulling the whole page.
>
> However, my efforts to specify the generatexml parameter failed.
>
You can work around this by grabbing the raw wikitext of the section
using action=query&prop=revisions&rvprop=content&rvsection=3 , then
passing the resulting wikitext to action=parse&text=WikitextHere . In
trunk, action=parse has a section parameter than can be used in
conjunction with the page parameter to cut out the middle man.
Roan Kattouw (Catrope)
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/mediawiki-api