[CSHARP-279] Implement an IBsonSerializer for XmlDocument and XDocument Created: 23/Jul/11  Updated: 03/Dec/20  Resolved: 03/Dec/20

Status: Closed
Project: C# Driver
Component/s: Feature Request
Affects Version/s: 1.1
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Robert Stam Assignee: Unassigned
Resolution: Won't Fix Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-696 Allow serialization to take into the ... Closed

 Description   

Implement an IBsonSerializer for XmlDocument and XDocument. This will allow storing an XML document as a BSON document and reading it back. Mapping the XML document to a BSON document allows the stored representation to be queried and indexed. Special consideration needs to be given to XML features like attributes that don't exist in BSON.



 Comments   
Comment by Justin Dearing [ 06/Nov/11 ]

Haven't touched this since September, but I just pulled from master and my unit tests are still in the same state.

Comment by Justin Dearing [ 26/Aug/11 ]

I added unit tests (that currently fail) for the extension metthods. Need to flesh out ToBson() some more. Will work on stub serializers next.
https://github.com/zippy1981/mongo-csharp-driver/tree/csharp-279

Comment by Justin Dearing [ 19/Aug/11 ]

Newtonsoft.Json already does xml2json. I have a test program that serializes a test xml file here: https://github.com/zippy1981/xml2json.Testcases

Should the bson serializer work differently, than that or are there any other edge cases I should cover? I'll turn that into formal unit tests.

Generated at Wed Feb 07 21:36:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.