xml_viewer

Crates.ioxml_viewer
lib.rsxml_viewer
version0.1.1
sourcesrc
created_at2024-08-15 08:24:07.684596
updated_at2024-08-15 14:30:01.34585
descriptionThe project creates an interactive HTML page from an XML string.
homepagehttps://github.com/YuriyRum/xml_viewer/
repositoryhttps://github.com/YuriyRum/xml_viewer/
max_upload_size
id1338450
size15,101
Yuriy Rumyantsev (YuriyRum)

documentation

README

The project creates an interactive HTML page from an XML string.

The usage is quite simple (Hope sope 😀). The function 'create_component' creates a custom component with a specific name and the attribute 'source'. If an xml string is passed to the 'source' attribute, the component renders an interactive xml tree on a page.

v0.1.1

  • Example of usage without custom component is added

Basic example:

use wasm_bindgen::prelude::*;
use xml_viewer::create_component;

#[wasm_bindgen(start)]
fn run() {
    create_component("xml-view".to_string());
}

Example without custom component:

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
pub fn convert_to_html(xml_source: String) -> String {
    xml_viewer::convert_to_html(xml_source)
}

Examples:

Commit count: 0

cargo fmt