Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SerializeToXml() throws an exception #151

Open
Adler-lug opened this issue Oct 28, 2023 · 0 comments
Open

SerializeToXml() throws an exception #151

Adler-lug opened this issue Oct 28, 2023 · 0 comments

Comments

@Adler-lug
Copy link

Adler-lug commented Oct 28, 2023

using var new_stream = new FileInfo("f:\\Downloads\\east.osm").OpenRead();
OsmStreamSource new_map = new XmlOsmStreamSource(new_stream);
// Some actions
var osm = new_map.SerializeToXml();

I'm getting an exception:

System.InvalidOperationException: "To be XML serializable, types which inherit from IEnumerable must have an implementation of Add(System.Object) at all levels of their inheritance hierarchy. OsmSharp.Streams.OsmStreamSource does not implement Add(System.Object)."

Screenshot

How to fix it?

Or is there another way to save the edited osm file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant