10000 GitHub - vodofrede/xml-rs: An XML 1.0 document parser implementation for Rust.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vodofrede/xml-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xml-rs

An XML 1.0 document parser implementation for Rust.

Usage

let text = r#"<?xml ?><can><beans kind="fava">Cool Beans</beans><sauce></sauce></can>"#;
let xml = xml::parse(text).expect("failed to parse as xml");
assert_eq!(xml.root.name, "can");
assert_eq!(xml.root.children[0].name, "beans");
assert_eq!(xml.root.children[0].attr("kind"), Some("fava"));

Limitations

This library is not 1.0 yet, and might be missing some features (I don't know which ones). Needs a once-over with the specification in hand.

Specifically missing (for now) is support for:

  • Spans for errors
  • CDATA sections
  • Namespaces
  • Numeric character references
  • '&amp;', '&lt;' and '&gt'
  • Reading PIs (currently ignored)
  • Reading comments (currently ignored)
  • XML version & encoding

About

An XML 1.0 document parser implementation for Rust.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0