![]() That's when it struck me that minifying CSS and JS is supported by various tools, but none is available for XML. However, this document must be minified again on one single line for the tool to be able to deserialize the file. That's where formatting comes in: if a user wants to get a nice overview of what's inside the file and easily modify a value, he'll just format the document make the job easier. You have to know that some of the users of the tool have Visual Studio + ReSharper, so these guys will be tempted to open the XML files and change a little value here and there before saving the file and feeding it again to the tool. I know you can tweak these settings and change the formatting of the XML created by the DataContractSerializer, but if that's not an option, you'll have to make sure those files respect the expected format. The default settings for the WCF DataContractSerializer make sure that the entire deserialized XML string gets saved into one single line. You figured it's some kind of testing tool right? :)Īnyway, the expected output and the actual output are being serialized when written to disk, and deserialized when read. ![]() Think about it as feeding the tool with an input XML file, processing it to create some output, and compare the output with some other XML file that represents the expected output. One of the requirements of the tool is that some users should be able to feed it with such XML files. I've been working on a little tool that uses WCF serialization lately and had to deal with these XML files representing deserialized datacontracts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |