Expand description
rxform — a Rust implementation of pyxform: converts XLSForm spreadsheets into ODK XForm XML.
let xml = rxform::convert_file(std::path::Path::new("survey.xlsx")).unwrap();
println!("{xml}");Re-exports§
Modules§
- error
- Error type carrying the spreadsheet location (sheet / row / column) and a probable cause or fix suggestion, so form authors can find mistakes fast.
- model
- In-memory representation of a parsed XLSForm.
- parser
- Parses generic sheet data (survey/choices/settings) into a
Surveytree. - types
- Question type definitions, ported from pyxform’s
question_type_dictionary.py. - xform
- Generates ODK XForm XML from a parsed
Survey, following pyxform’s output conventions (element order, itext ids,${ref}expansion). - xls
- Workbook reading: turns an .xlsx/.xls/.ods file into generic sheet data.
- xmlwriter
- Minimal XML tree + pretty printer matching pyxform’s output conventions:
2-space indentation, alphabetically sorted attributes, self-closing tags
for childless elements without text, and
<tag></tag>for empty text.
Structs§
- Conversion
- A finished conversion: the XForm document plus the
itemsets.csvcompanion file when the workbook has anexternal_choicessheet.
Functions§
- convert
- Convert an XLSForm workbook file, returning all conversion outputs.
- convert_
file - Convert an XLSForm workbook file (.xlsx/.xls/.ods) to XForm XML.
- convert_
workbook - Convert already-loaded sheet data to XForm XML.
fallback_namesupplies the form id/name/title when the settings sheet does not define them. - convert_
workbook_ full - Convert already-loaded sheet data, returning all conversion outputs.