Issue
When exporting my file, I see strings enclosed in double quotes or CDATA.
Answer
They are enclosed for two reasons:
- It was enclosed during import.
- There are leading or trailing spaces in the translation, the quotes are to preserve them.
The double quotes or CDATA should not appear in your app.
More documentation about XML formatting and styling can be found here.
Comments
3 comments
CDATA (Character Data) sections are used to enclose strings that contain characters that might otherwise be interpreted by the XML parser. This includes characters like "<" or "&" which have special meanings in XML. By wrapping the string in CDATA, you ensure these characters are treated literally as part of the string.
Badland
. I understand that CDATA (Character Data) sections are used to enclose strings that contain characters that might otherwise be interpreted by the XML parser, like "<" or "&". By wrapping the string in CDATA, these characters are treated literally as part of the string. Is that right?
Strings in the exported Android XML file appear wrapped in double quotes or CDATA sections.
These quotes or CDATA might have been present in the original imported file. OneSky keeps the formatting consistent during the translation process.
If the translated string has leading or trailing spaces (spaces at the beginning or end), quotes are added to ensure those spaces are preserved in the final XML file used by your app.
These quotes or CDATA sections should not appear in your app's code. The Android system handles them during parsing and removes them before using the string values.
OneSky provides a link to further documentation on XML formatting and styling, which can be helpful for understanding proper XML structure.
This response effectively addresses the user's concern by explaining the reasons for quotes/CDATA and assuring them that these elements won't affect their app's functionality. It also provides an opportunity for further learning on XML formatting. Maxim Time Clock
Please sign in to leave a comment.