xml2rdf
CLI tool for converting XML to RDF
This Rust-based tool converts XML data into RDF format, utilizing the oxrdf
crate for RDF graph handling and xml-rs
for efficient XML parsing. Generated triples can either be added to an oxrdf::Graph
or written directly to file.
Using the xml2rdf CLI
This library includes a CLI utility for parsing XML and generating N-Triple RDF using the convert
subcommand. The binary can be built using cargo build
.
)
)
Using the convert library
The conversion functionality can also be called directly in Rust. The library supports writing results to a file or building an in-memory oxrdf::Graph
.
use parse_xml;
use writer;
use Graph;
// capture conversion results to file
let mut w = to_file.unwrap;
parse_xml;
// capture conversion results to an oxrdf::Graph
let mut g = new;
let mut w = new;
parse_xml;
License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.