I wrote a function that builds an XML string based on the data stored in my application. Then, this line should be written to the actual XML file, so it can be used. This file should then be used in the HTML web application for submitting data. I use the following code snippet to do just that:
xmlDoc.Save("exercise.xml");
Easy, but there is a small catch. My XML file will not work properly in Firefox as it treats the space as childNode. Rewriting my entire web application to a large extent is not worth it, as it will be too much work. I would rather just save my XML string in an XML file in an unformatted way, as I tested and confirmed that this works in almost every conceivable browser. The line itself does not contain any carriage returns or tabs, so the Save () method probably adds it automatically. Any way to prevent this from happening, or another easy way to get around this?
Jort source
share