Greetings,
following problem: I want to store a XML File in OutSystems and use this to extract data from it.
Storing:
Reading:
Observation:
When you are storing the XML file, ensure the process is correctly encoding and converting the file contents. Here’s a more detailed breakdown:
File_ReadText: This step is correct, where you read the contents of the XML file as a UTF-8 encoded string.
TextToBinaryData: Converts the text (XML file contents) to binary format, so it can be stored in a binary attribute.
Store in an Attribute of Type Binary: You're correctly storing the binary data in a Binary type attribute.
When you retrieve the file from the Binary attribute, the issue with double quotes might occur due to improper conversion during the BinaryDataToText step. Here's what you need to verify:
3. Possible Issue: Encoding or Character Escape:
When dealing with special characters like double quotes (") or angle brackets (<, >), the issue might arise due to how these characters are escaped or processed during the conversion. You should:
Check for XML encoding issues: When reading the XML file back, check if the double quotes are being escaped incorrectly (i.e., " instead of ", or similar).
XML Parsing: After retrieving the text data, consider parsing it into an XML structure instead of working with raw text. OutSystems has built-in XML parsing functionality that could help ensure the file is handled correctly.
The Problem is related to empty fields.
As an example
<DATA-OBJECT-PROP-REF ID-REF=""></DATA-OBJECT-PROP-REF>
This is causing problems. MY workaround is to manipulate the XML before converting this
<DATA-OBJECT-PROP-REF ID-REF="NULL"></DATA-OBJECT-PROP-REF>
Hi @Jens Vogelgesang ,
can you share an oml and a sample file demonstrating the problem?
I'm trying to reproduce the text => binary =>database => binary => text part, and i can't see any "" disappearing
What forge component is that File_ReadText coming from ?