from_xml_async

Function from_xml_async 

Source
pub async fn from_xml_async(
    xml: &str,
    config: &FromXmlConfig,
) -> Result<Document, String>
Expand description

Parse XML string asynchronously (runs on tokio threadpool)

This is useful for CPU-bound parsing that shouldn’t block the async runtime.

§Examples

use hedl_xml::async_api::from_xml_async;
use hedl_xml::FromXmlConfig;

let xml = r#"<?xml version="1.0"?><hedl><name>test</name></hedl>"#;
let config = FromXmlConfig::default();
let doc = from_xml_async(xml, &config).await?;