dgm9704 / Xoxo

read, write, compare, convert XBRL reports
GNU Lesser General Public License v3.0
27 stars 9 forks source link

Xml/Report FromXml does not provide an overload for additional parameters. #84

Closed bigsmity closed 7 months ago

bigsmity commented 7 months ago

public static Report FromXml(string content) { using (var stream = new MemoryStream()) using (var writer = new StreamWriter(stream)) { writer.Write(content); writer.Flush();

            stream.Position = 0;

            return FromStream(stream);
        }
    }

My workaround was to prepare a stream and use: public static Report FromStream(Stream stream, bool removeUnusedObjects, bool collapseDuplicateContexts, bool removeDuplicateFacts)

dgm9704 commented 7 months ago

Thanks for reporting and providing a workaround! I will check this out and get back to you.

dgm9704 commented 7 months ago

This seems like an easy fix with just adding some overloads. In the meantime, might I ask a about your use case for this? I think originally made the FromXml method just for internal testing purposes and didn't think there would be any actual use for it in an actual application. I'm just curious plus I wan't to make sure I'm not overlooking something else that people actually need.

dgm9704 commented 7 months ago

Fixed in v3.2.1

bigsmity commented 7 months ago

This seems like an easy fix with just adding some overloads. In the meantime, might I ask a about your use case for this? I think originally made the FromXml method just for internal testing purposes and didn't think there would be any actual use for it in an actual application. I'm just curious plus I wan't to make sure I'm not overlooking something else that people actually need.

Thank you for taking a look at my issues so quickly. We are communicating with a webservice that uses xbrl payloads and are storing responses in a table as a cache to limit these calls. We also anonymize the data and run in future test cases. Using sql server with text column and entity framework, so we have a string which the method suited perfectly.

We just moved up to the current version as we have updated to .net 8 and some new test cases identified the duplicate issue, and then the need to switch off the duplicate parameter.