#xml-parser #pair #tokens #field #source #github

bin+lib my_xml_parser

XML parser, which can be used to parse XML to pairs of tokens. See source https://github.com/giginfee/my_parser

1 unstable release

0.1.2 Nov 14, 2023

#75 in #pair

MIT license

8KB
125 lines

My XML parser

XML parser, which can be used to parse XML to pairs of tokens

crates.io

USAGE

To bring this crate into your repository, either add my_xml_parser to your Cargo.toml, or run cargo add my_xml_parser.

EXAMPLE

 use my_xml_parser::*;
  

pub fn main() -> anyhow::Result <()>{

    let successful_parse = parse_xml("<r><a></a></r>")?;
    println!("{:?}", successful_parse);
    Ok(())
  }

Result will be like this:

[xml(0, 14, [entity(0, 14, [field(3, 10, [empty_entity(3, 10)])])])]

Console use

-cargo run xml "your xml"

-"cargo run info."

Dependencies

~2.2–3MB
~59K SLoC