neco-plist
zero dependency plist XML subset parser.
Features
- XML-shaped plist dictionaries converted to ordered maps
- Nested XML elements converted recursively
- Empty XML elements converted to empty strings
- Scalar parsing for null, bool, number, and string values
ParseErrorwith byte-oriented position and message
Usage
Parse
use ;
let value = parse.unwrap;
assert!;
Read fields
use ;
let value = parse.unwrap;
let Map = value else ;
assert!;
API
| Item | Description |
|---|---|
parse(input: &str) -> Result<PlistValue, ParseError> |
Parses the supported plist XML subset |
PlistValue |
Null, Bool, Number(f64), String, List, or ordered Map |
ParseError |
Reports byte position and message |
Format support
The supported subset covers lightweight XML property-list shapes used as configuration data. It maps element names to fields and preserves field order. Binary plist and full Apple plist semantics are represented by later parser coverage, not this minimal subset crate.
License
MIT