Fix XML format to match actual QWOM data source (phon_data, data_form, UTF-16, CRLF) #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The app was using an incorrect XML format that did not match the actual QWOM data source from https://github.com/rulingAnts/QWOM_Data. This prevented the app from successfully importing real wordlist data files.
Issues Found
XML Structure:
<Wordlist>as root element instead of<phon_data><Entry>for row elements instead of<data_form><Picture>for image field instead of<Image_File>File Encoding:
Solution
Updated the XML import/export logic and test data to match the actual Dekereke/QWOM format used by the data source (verified against QWOM2025-08.xml with 987 entries).
Changes Made
Import Parser (
lib/services/xml_service.dart):Entrytodata_formImage_Filefield with fallback toPicturefor backward compatibilityExport Generator (
lib/services/xml_service.dart):<Wordlist>to<phon_data><Entry>to<data_form><Picture>to<Image_File>Test Data (
test_data/sample_wordlist.xml):Documentation (
FLUTTER_README.md):Tests (
test/xml_service_test.dart):Format Comparison
Before (Incorrect)
After (Correct - matches QWOM)
Verification
<Picture>field in importsThe app can now successfully import real QWOM wordlist data files and export data in the correct format for use with Dekereke and other linguistic tools.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.