[][src]Crate parsoid

parsoid-rs

Wrapper around Parsoid HTML that provides convenient accessors for processing and extraction.

Inspired by mwparserfromhell, parsoid-jsapi and built on top of Servo's html5ever.

Mutation/modification is still a work in progress.

Example

Go through all templates on a page from the English Wikipedia

use parsoid::Client;
let client = Client::new("https://en.wikipedia.org/api/rest_v1", "parsoid-rs demo")?;
let code = client.get("Taylor_Swift").await?;
for temp in code.filter_templates() {
    let template = temp?;
    dbg!(&template);
}

Re-exports

pub use crate::api::Client;

Modules

api

Structs

FilterTemplates
TransclusionTemplate

Representation of the data-mw part of mw:Transclusion.

Wikicode

Container instance for Parsoid HTML