0

I have a dynamic linked library written in C# 3.0. This library has a small set of public classes that I want to make XML representations for. The idea is to allow "saving/loading" of objects from disc using XML as the representation. I would also like to allow users of the class library to pass these XML representations to certain functions of the library as inputs. I have never used XML in this way before so I'm currently in the middle of trying to learn and understand XML.

I have seen quite a bit on the XMLSerializer class online but I'm not sure if that's what I'm looking for because I want to have these objects represented in the program as XML so I can manipulate them in the XML format rather than just writing directly to a file.

Should I define an XSD file? What .Net classes do I need to learn about? Are there any good places to start learning how to do this kind of task?

1 Answer 1

1

You can use XmlSerializer with a StringReader and StringWriter to write the XML to a string instead of a file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.