Closed simonkimi closed 2 months ago
I am offline for some days but it has been problem with this before. I will back in the weekend.
No worries at all. I’ve temporarily resolved the issue by creating a fork. We can discuss it further when you’re ready.
I have corrected the bug in the C++ library. Two calls to the WriteString(true) was missing the argument true. I suppose this will solve the initial problem. The C++
I normally build the .NET C++/CLI wrapper with the Visual Studio solution (mdflibrary.sln/vcxproj). I will check the .NET interface tomorrow as it was original designed for read-only support.
I have added a MdfHeader::CreateMetaData() function that either return the existing object or creates a new one. I have not checked but .NET should have some XML library that could generate XML string in/out without a header.
However there are a lot of improvements to add to the .NET interface regarding the meta data. The C++ library have some more features that the .NET wrapper is missing.
Hello!
I am using the .NET MDF library to generate MDF files, but I am encountering some issues when inserting metadata.
My code is as follows. When AddCommonProperty is commented out, the generated file works fine. The context is as follows:
However, after uncommenting the AddCommonProperty part, an XML header was added to the XmlSnippet, which caused both the Vector MDF Validator and asammdf to fail to recognize it.
English: Invalid XML: Invalid XML declaration
After reviewing the code, I found that skip_header in IXmlFile::WriteString was set to false. I am not sure whether this is a bug, a feature of MDF, or if there is an issue with how I am using it.
Another issue: I want to fully customize my MetaData, but before I set any values like
header.Author
,header.MetaData
is null. I don't know how to initialize it.Looking forward to your guidance.